Git tricks

  • Undo a naughty commit:

    git reset --soft HEAD~1

  • Change git origin:

    git remote set-url origin <origin>