Fetch all remotes and prune
Update all remotes and delete stale tracking branches
git fetch --all --prune --tags
More git commands
-
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
-
git stash push -m 'wip: feature-x' -- src/Stash only src/ with a descriptive name
-
git stash list && git stash apply stash@{2}List stashes and apply a specific one by index
-
git cherry-pick A^..BApply commits from A to B (inclusive) onto current branch