How to merge git commits in the develop branch to a feature branch

To integrate one branch into another, you have to either merge or rebase. Since it’s only safe to rebase commits that aren’t referenced anywhere else (not merged to other local branches; not pushed to any remote), it’s generally better to merge. If your feature branch is purely local, you can rebase it on top of … Read more

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

Create your topic branch off of the first branch. As soon as the first is merged into master you can rebase on top of that, and assuming not too much was changed it shouldn’t be a problem. If the commits of the first branch aren’t changed your new branch will stack neatly on top of … Read more

Create a branch alias? [duplicate]

Please see here: https://stackoverflow.com/a/549949/606723 You can rename the master branch trunk as Greg has suggested, or you can also create a trunk that is a symbolic reference to the master branch so that both git and svn users have the ‘main’ branch that they are used to. git symbolic-ref refs/heads/trunk refs/heads/master Note that trunk isn’t … Read more

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

NOTE: You can add other branches to exclude like master and dev if your workflow has those as a possible ancestor. Usually I branch off of a “sprint-start” tag and master, dev and qa are not ancestors. First, list locally-tracking branches that were merged in remote (consider using -r flag to list all remote-tracking branches). … Read more