About

Useful commands in git that I can never seem to remember but are very useful.

Unstage commit

If one tries to commit a file > 100 Mb limit in GitHub, the push will not take and your repo can essentially be in this awkward stage where it’s hard to revert changes and keep the repository up to date. Here’s the basic workflow for fixing it–

git reset HEAD~
--remove file--
rm LARGEFILE
--git ignore large file--
vi .gitignore  # then modify
git add -A
git commit -m "fixed large file commit"
git push