Ceilingfish Ceilingfish - 1 year ago 144
Git Question

Merge two TFS branches with git tfs

I'm using

, and I was wondering if it is possible to merge two TFS branches using
. I have two branches $/MyCompany/Dev & $/MyCompany/Release-3.3. Release-3.3 originates from the Dev branch. Both are checked out as different git repositories using git tfs.

I'd like to re-incorporate the changes back into the Dev branch. Can this be achieved with
or will I have to resort to trying to do it using TFS tools?

Answer Source

I found an awesome, if hacky way of doing this. Git tfs manages it's awareness of areas of TFS using git config. Specifically 3 attributes per remote; url, repository and fetch, for example:


You can add another remote by setting these 3 properties again with a different name to default. Eg:


You may need to issue git tfs bootstrap now.

You can then issue:

git tfs fetch -i feature_branch

Then merge the commits using:

git merge tfs/feature_branch
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download