• Home
  • About
    • software-developer.org photo

      software-developer.org

      through time I have gathered lots of notes and thought, now I try to sort 'em out ;)

    • Learn More
    • Email
    • Twitter
    • Facebook
    • LinkedIn
    • Xing
    • Instagram
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

Git - deleting local and remote branches, finding merged branches

04 Dec 2017

Reading time ~1 minute

Delete local and remote branch

# delete local branch
git branch -D branchName
# delete remote branch
git push --delete origin remoteBranchName

Finding merged branches for deletion

# find merged branches into master
git branch --merged master
# when you're on master you can omit 'master' at the end
git branch --merged
# count results/line output
git branch --merged | wc -l
# find remote
git branch -r --merged master


gitdeletemergedlocalremotebranch Share Tweet +1