LoginSignup
0
0

More than 5 years have passed since last update.

[Git備忘録]ステージしたものをすべてアンステージする

Last updated at Posted at 2017-08-26

Purpose

when you done something wrong and you want to discard changes

example

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.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0