Git housekeeping commands

/
git commands knowledge

TLDR: git branch -d <branch name> # Local "safe" delete

git checkout master

Local branches

git branch

Remote branches

git branch -r

Branches merged into checked out branch (master)

git branch --merged

Local "safe" delete

git branch -d <branch name 1> <branch name 2> ...
git branch --no-merge

Remote "unsafe" delete

git push --delete origin <branch name 1> <branch name 2> ...
git remote prune origin --dry-run

References:

[1]: medium.com/@milan.brankovic/git-housekeeping Retrieved: 6 August 2021 20:00 Git housekeeping

[2]: Git Reference Retrieved: 6 August 2021 20:00 Git Reference