Add changes to the last commit
Add staged changes to the last commit and keep its message
git commit --amend --no-edit
More git commands
-
git push origin --delete feature/old-branchRemove a branch from the remote repository (origin)
-
git clean -fdxDelete untracked files and directories, including ignored ones. There is no undo
-
git fetch --all --prune --tagsUpdate all remotes and tags, and delete stale remote-tracking branches
-
git commit --amend -m 'new message'Rewrite the message of the latest commit. Safe only before you push
-
git rebase -i HEAD~5Squash, reorder, or edit last 5 commits