diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-06 19:52:18 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-09-06 19:52:18 +0300 |
commit | b0be58a1b313df976ea4b0e37163f8fea81ce5f4 (patch) | |
tree | 9f24d3c53f6d47fb6266f00db9f60f514447ed2a /doc/university/training/topics/unstage.md | |
parent | 2d16f4794b43966595e8c6b6405b55c60e94e866 (diff) |
Resolve "CE documentation is not CommonMark compliant"
Diffstat (limited to 'doc/university/training/topics/unstage.md')
-rw-r--r-- | doc/university/training/topics/unstage.md | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/doc/university/training/topics/unstage.md b/doc/university/training/topics/unstage.md index fc72949ade9..ee7913637b9 100644 --- a/doc/university/training/topics/unstage.md +++ b/doc/university/training/topics/unstage.md @@ -10,26 +10,27 @@ comments: false * To remove files from stage use reset HEAD. Where HEAD is the last commit of the current branch. -```bash -git reset HEAD <file> -``` + ```bash + git reset HEAD <file> + ``` * This will unstage the file but maintain the modifications. To revert the file back to the state it was in before the changes we can use: -```bash -git checkout -- <file> -``` + ```bash + git checkout -- <file> + ``` ---------- * To remove a file from disk and repo use 'git rm' and to rm a dir use the '-r' flag. -``` -git rm '*.txt' -git rm -r <dirname> -``` + ``` + git rm '*.txt' + git rm -r <dirname> + ``` * If we want to remove a file from the repository but keep it on disk, say we forgot to add it to our `.gitignore` file then use `--cache`. -``` -git rm <filename> --cache -``` + + ``` + git rm <filename> --cache + ``` |