Creating a new repository mkdir project cd project git init git remote add origin git@github.com:...
revert to last commit: git reset --soft HEAD~1 revert to commit X and don’t forget the final ‘ ....