How to unstage files in git
Its not unusual to do Now you have a completely clean stage and you can add stuff again. This is perhaps the simplest way to achive this. If its just a file or two that are botheriing you, and you dont want to mess with the other files that are already there in the stage, you can do this This will effectively replace the file in your stage with its version in the HEAD all still retaining it in your working directory. However, if you just started out fresh and you forgot to add a .gitignore and accidentally added a bunch of wrong files, the most hassle free way is to delete your .git folder and start all over.git add
and realize that you forgot to add a file pattern into your .gitignore due to which some unnecessary files got added into your stage area. There are a couple of ways to do that.git stash
git stash pop
git reset filename