Posts

Showing posts with the label feature-branch

How can I delete all Git branches which have been merged?

How can I delete all Git branches which have been merged? I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one? git branch -D deletes branches that have NOT been merged! Use with care! – Dan Solovay Dec 23 '16 at 14:05 To be slightly more specific git branch -D deletes any branch whether it as been merged or not. – PhilT Feb 8 '17 at 9:48 git branch -D You can also do this directly from GitHub, if you go to the 'branches' section of your repo (e.g. github.com/<username>/<repo_name>/branches). There should be a list of all your branche...

How does one work on a new git branch that depends on another git branch that is not yet merged?

How does one work on a new git branch that depends on another git branch that is not yet merged? Here's my scenario: My project is following the topic branching pattern. I create a branch to fix some problems, let's call this branch problem_fixes. I make my changes, and submit a pull request. I need to start work on a new feature, so I create a second branch called my_feature and commit a bunch of changes. At some point I realize my_feature is dependent on problem_fixes which has not yet been accepted and merged (the my_feature branch relies on some of the fixes from the first branch and I can't make progress without them). Short of badgering my project lead to accept and merge my first branch faster, what is the best process to follow here? I am wondering if I need to start a new, third branch based on problem_fixes (instead of master) and merge in my commits to my_feature? Or will it be okay if I simply merge problem_fixes into my_feature and continue work -- assuming pro...