# Safely delete a local branch
git branch -d
# Delete a remote branch
git push origin --delete
# Prune local tracking branches not on the remote
git remote prune origin
# Remove the remote branch tracking on the local machine
git branch -dr origin/
# Merge a feature branch into one commit, squashing individual commits
git merge --squash
# Fetch updates from the remote repository
# and switch to a new or existing local branch that tracks a remote branch
git fetch
git switch -c