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.
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
Post a Comment