New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage tfs/NameOfMyBranch in fetch -i command #171
Comments
Hi, In fact a guy in the git-extension forum gave me a workaround ( https://github.com/spdr870/gitextensions/issues/869 ) to do what I wanted to do but I fall on a bug of git-tfs. And I don't know why it don't work. Because gitExtension give me the name 'tfs/default' for a branch and git-tfs need just 'default' as parameter, he told me to use the unix command 'sed' to help me. Like that : But git-tfs failed unexpectely with a strange message : But 'default' is the name of my branch!!!!!! Any idea? |
As with many refs in git, the tfs remote id goes by several different names. Depending on the context, it goes by 'refs/remotes/tfs/default', 'tfs/default', or just 'default'. (git-tfs is fairly simplistic about how it handles the id in different contexts, so there may be room for improvement.) Here's how it works now. 'default' is the actual id of the remote. If you do The id of the remote is used in the name of the remote tracking branch. The full name of the branch is 'refs/remotes/tfs/default'. Git lets you call it 'tfs/default'. (I don't think you can call it 'default' when talking about the branch. You can ask git by doing hth |
Ok, I understand better why it's not a good idea. I was wandering but was quite not shure about that! But do you have an idea for my second message? The command 'sed' do it's job so git-tfs should receive the good values but make an error :( |
This command passes the output of git-tfs through sed, which isn't what you need. You need something more like this:
|
After quite some tries (and lost of failed --due to cmd.exe--) trying your commands, I figured out what was the problem... I put it here if it could help someone! Like I explain here ( https://github.com/spdr870/gitextensions/issues/869 ), this command was to use with GitExtension (and not with the command line). and it works! |
Hi,
Does it make sens (and is it possible) to manage tfs/NameOfMyBranch in fetch -i (and ct -i) command?
Actually, if you want to manage many tfs branches, you have to use the command :
git tfs fetch -i NameOfMyBranch
Is it possible to add the possibility to use the command with the branch name "tfs/NameOfMyBranch" :
git tfs fetch -i tfs/NameOfMyBranch
When you use this command, you have the message :
Unable to locate git-tfs remote with id = tfs/gf_1-0-x
You may be able to resolve this problem.
git tfs bootstrap
to auto-init TFS remotes.Actually, I try to use git-tfs with gitExtension and to add scripts (in gitExtension) to make the use easier and try to convince my team to use git.
But the only information given to me by gitExtension (with the variable {sRemoteBranch}) to add working scripts is "tfs/NameOfMyBranch" instead of "NameOfMyBranch" expected by git-tfs.
The problem should be the same with the commant "ct -i".
Thanks in advance for your answer.
Philippe
The text was updated successfully, but these errors were encountered: