Wrong files added in commitMon 19 March 2018 by Aditya Arora
This post helps users to revert changes made while using git. We might add wrong files while committing. It is a good practice to use
to check what files are currently worked on. So this is what you have done
- Added the wrong files to the staging area
- Not push
What to do now?
- Reset to the last commit
git reset --soft HEAD~1
- Remove folders that you dont want
git reset node_modules/
- Check status to see the added files in the staging area
- Make new commits
git commit -m "Cleaning styles.css"
- Push the commits
git push -u origin master