How do I use git-tfs and idiomatic git branching against a TFS repository? -


how use git-tfs idiomatically?

  • the git idiom check out branches to root directory of repository. checking out branch replace contents of directory contents of branch.

  • the tfs idiom check out each branch in different directory under root directory of repository (even master or trunk branch). checking out branch place in new directory next current one.

using git-tfs, can clone tfs repository or branch git repository. want work on tfs repository multiple branches in manner consistent git branching idiom. i'm not sure what's technically possible or recommended :)


clone whole tfs repository

if clone whole repository out of tfs

> git tfs clone http://<tfsurl>:8080 $/main 

that give me git master containing all tfs branches directories.

[master]> dir   trunk   feature-logon   feature-search   release-0.0.1 

add remote per tfs branch

i don't know if can (or how to) map git remote each tfs branch.

> git init . [master]> git tfs clone http://<url> $/main/trunk . 

then

[master]> git checkout -b feature-logon [feature-logon]> git tfs clone http://<url> $/main/feature-logon . 

i know technically incorrect, don't know better without playing (my tfs repo large, experimenting taking long time)

it's possible tfs branches correct git branches if cloning using git-tfs. in stable release! first clone not entire repository trunk :

git tfs clone http://<tfsurl>:8080 $/main/trunk 

then run branch --init, creates new branch in git repository

git tfs branch --init $/myproject/mytfsbranch 

in case :

git tfs branch --init $/main/feature-logon 

or use the --all flag on fresh cloned repository create branches present on tfs server.

git tfs branch --init --all 

you clone directly branches using flag --with-branches:

git tfs clone http://<tfsurl>:8080 $/main/trunk --with-branches 

the documentation new command here. feel free provide feedback improve it...


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -