Amend last commit message
Include staged changes in last commit without changing message
git commit --amend --no-edit
More git commands
-
git push origin --delete feature/old-branchRemove a branch from the remote repository
-
git clean -fdxRemove untracked files and directories (incl. gitignored)
-
git fetch --all --prune --tagsUpdate all remotes and delete stale tracking branches
-
git commit --amend -m 'new message'Rewrite the most recent commit message (local only)
-
git rebase -i HEAD~5Squash, reorder, or edit last 5 commits