- reword:
git commit --amendorgit commit --amend -m "New message" - edit last commit:
git reset HEAD~- make your changes
git addyour changesgit commit -c ORIG_HEAD
- git force-pull
- git prune-local
- git remove tags:
- remote:
git push --delete origin <tagname> - local:
git tag -d <tag_name>
- remote:
- annotated signed tag:
git tag -a v1.0.0 -s -m "v1.0.0" - cherry-pick N last commits from a branch:
git cherry-pick $BRANCH~$N..$BRANCH] - undo
git commit --amend:git reset --soft HEAD@{1}
Last active
June 24, 2025 08:54
-
-
Save byF/3dc8bb647bea7ff61bfdbf31c227d40e to your computer and use it in GitHub Desktop.
Git Cheatsheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment