09-30-2019


How to set github user email in git terminal specific to a project?

git config user.email "your@email.com"

How to undo the last git commit and revert the changes?

git reset --hard HEAD~1

How to undo the last git commit and keep the changes?

git reset --soft HEAD~1

How to revert multiple commits, inclusively?

git revert --no-commit < hash of last commit to revert >..HEAD

How to remove remote directory after adding to .gitignore?

git rm -r --cached