Undo git add before commit


GIT Basics :

     
git add  moves changes from current working directory to another area. This is known as staging area and moving files from current directory to staging area is known as staging.

So to undo our changes we can use following command :
                                         
                                                             git reset HEAD --

Their is also some other commands found, but i tried this one and it really helpful for me.
Some other commands :

 git reset FILE
 git remove / git rm - Dont use this command, it will remove the file.

Comments

Popular posts from this blog

Disable or enable proxy for Internet explorer or Chrome

chm viewer unable to show contents

3 prisoners and 5 hats puzzle