Tag: branch

Branching Strategy – Maintaining Multiple Releases

For years we’ve been using TFS (TFVC) as our version control system. We will probably migrate to git anyway, but I am trying to figure out 1) Is there a more sensible branching strategy/model than the one we’re currently using, specifically for maintaining multiple production releases (typically for several different customers)? 2) With regards to […]

Getting push reject when trying to push to a remote branch

After getting changes from a different branch using rebase when, I’m trying push the new changes to a remote private branch I’m getting the following message Push of the current branch XXXX was rejected. Remotes changes needs to be merged before pushing. In this case merge is highly recommended, because there are non pushed merge […]

Two conflicting git remotes

We had an issue with a bad merge that couldn’t be undone cleanly (it reverted one of the branches, so it couldn’t be merged back in). We created a new version of the branch from the last good commit, merged the new changes into it cleanly, deleted the original and pushed the new one to […]

use branch in multiple branches

I have following situation: I have one branch A that is holding a class in java program. This class is used in two other branches B and C developed by 2 different people. It is not finished yet, but already needed by those two people to develop their own. A is going to be finished […]

Create git branches in multiple repositories at the same time

I have twenty git repositories on github and I want to be able to create a branch in all the twenty repositories with one command or click (without going through to all the twenty repos manually one at a time). I do understand that I may write a shell script to do that. I am […]

Strategy for maintaining git branches that with different versions of an API?

Is there an effective way of using git to manage two branches that are based on the same code logic but support different API’s? Here is a concrete example: Suppose I have a repo with one Python 2 file called abc.py. In commit A on branch py2, the file contents are: print ‘A’ Now I […]

Git checkout files from a branch without tracking them

My question is this: I have a git repo with a directory in the .gitignore file. Normally this works and any files that are changed in the directory are ignored. However if I checkout files into the ignored directory from a branch that doesn’t ignore those files i.e.: git checkout a_branch /c/IgnoredDirectory I find that […]

Git: Two subdirectories, how to pull from different branches and push to one master branch

I’ve seen answers on how to push different directories to different branches, how to pull/push from different repos for different directories, etc. But I’ve got a problem combining these two things. So I have a git repository in, say mydir/, and it has two subdirectories: 1.)mydir/package 2.)mydir/foo. The mydir/package is cloned from another git repo, […]

Git 3 branches merge with every 2 branches having no conflict

I am discussing about git merge issues with a colleague of mine. And I come to a question. There are three branches from a same branch: b1 b2 b3. The three branches have unique modifications(commits). But everyone of them can be merge into any other one without conflict. Then there mustn’t be conflicts when merging […]

Git: How are we losing code?

We have a small team, using a modified GitFlow workflow. One developer just commits and pushes directly to develop; the others create topic/feature branches as needed. We’ve noticed once or twice that when we merge and commit one of our branches, some changes to develop from the other guy just go missing. We’re pretty sure […]

Git Baby is a git and github fan, let's start git clone.