when you done something wrong and you want to discard changes


git add ccc.txt
git status

after track file you can saw your branch status like below

On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   ccc.txt

maybe after meeting with your boss,you have to do rallback your code

git reset HEAD ccc.txt
git checkout -- ccc.txt

now you did rallback your code already.

Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.