How to avoid having to do “git branch –set-upstream”, and instead default to automatically setup remote tracking?

Git v2.37.1 and above If you are using the mentioned version or above you can use this new config entry to automatically setup remote tracking: git config –global push.autoSetupRemote true After that, when you do git push tracking is setup automatically. No need for git push -u origin my_branch A shortcut, which doesn’t depend on … Read more

Git: merge only the changes made on the branch

This article advises to instead of merging two branches, you would rebase them where git would only rebase non duplicate commits. But instead of cherry-picking, you might consider just rebasing the branch: rebase –onto release B bug where release is the release branch and bug is the bug branch. You then get something like C’—D’ … Read more

Freezing a Git branch

Christopher is right, tagging will help you do this. I recommend deleting the branch name too to make it a little harder for someone to checkout the branch and make edits. First, merge the branch into develop git checkout develop git merge –no-ff feature_1 Then checkout the branch git checkout feature_1 Then create a tag, … Read more

Git pull all branches from a remote repository

Read e.g. this explanation http://git-scm.com/book/en/Git-Branching-Remote-Branches First let’s clarify some git terminology: fetch: getting contents (or updates) from a remote repo pull: fetch (as above) and merge in one step The original poster did not mention merging, so I might guess in proper git terminology he might even have wanted to ask “git fetch all branches … Read more