I\'m using git-tfs
, and I was wondering if it is possible to merge two TFS branches using git-tfs
. I have two branches $/MyCompany/Dev & $/MyCompan
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:
tfs-remote.default.url=http://tfsserver:8080/tfs/collection
tfs-remote.default.repository=$/Product/Branch/Component
tfs-remote.default.fetch=refs/remotes/default/master
You can add another remote
by setting these 3 properties again with a different name to default
. Eg:
tfs-remote.feature_branch.url=http://tfsserver:8080/tfs/collection
tfs-remote.feature_branch.repository=$/Product/FeatureBranch/Component
tfs-remote.feature_branch.fetch=refs/remotes/default/feature_branch
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