Git Cheat Sheet

Below is a table with commands I don’t run frequently enough to remember them, and have to rely on searching on internet again and again. Now it’s saved somewhere. 😀 Last update: August 21st, 2022. Operation Command Commit without files git commit -m "some message" --allow-empty List commits in one line each git log --oneline Remove local tag git tag -d <tag_name> Remove remote tag git push --delete origin <tag_name> Stash changes git stash Retrieve changes from stash git stash pop Delete local uncommitted changes git reset --hard Revert a commit git revert <commit_ID> Rebase git rebase <branch> Rebase interactive git rebase -i <branch> Add a remote git remote add <alias> <uri> What about you?

Read More