I don’t quite understand what you are doing badly, but there is something you should use git-tfs now ...
Working with the TFS branch I see that you created the branch (step 2) and committed to this branch. When you checked your "NewBranchName" branch, you should check with the command:
git tfs rcheckin -i NewBranchName
and pull the modifications with:
git tfs pull -i NewBranchName
or (with rebase)
git tfs pull -r -i NewBranchName
If you do not specify the -i option with the name of the TFS remote, you will check the commit in the main branch (here $ / Project / Name / Branch): (
- Check your commits on TFS I give you a command to check your commits. But you should know that for some reason, when you check the git commit in TFS, a new set of changes to TFS is created (what we want;)) and after creating a new git commit. This is almost the same as the original, but with some information (which you can see in the git comment). Because of this, depending on what you are doing (and I don’t understand exactly), you may have problems because git is trying to combine the commit with the exact same changes in the same place, so the merge cannot be automated .
In fact, I think that something is wrong in your workflow, because you should not face this problem. Try to find a problem in your workflow.
Hope this helps.
Feel free to see the wiki git -tfs: https://github.com/git-tfs/git-tfs/wiki I hope there is some pretty useful information (this partly happened, with love;))
PS: To help you better, can you tell me which command you use to check your commits? checkin, checkintoo, rcheckin? rcheckin is highly recommended!
What I do to automate the workflow:
(here “bitbucket” is the intended name of your remote Bitbucket repository)
=> in the main branch:
//Do your job & commit with git & ... //rebase your work on TFS work git tfs pull -r //rcheckin with git-tfs git tfs rcheckin //commit in bitbucket repo git push bitbucket master
=> in the "NewBranchName" branch:
//Do your job & commit with git & ... //rebase your work on TFS work git tfs pull -r -i NewBranchName //rcheckin with git-tfs git tfs rcheckin -i NewBranchName //commit in bitbucket repo git push bitbucket NewBranchName
PS2: You may need to apply your changes if you have undefined changes to the working directory before doing pull -r and rcheckin ...
EDIT: you are editing, I am editing;)
I used to assume that you defined a remote file for your bitpack repository:
git remote add bitbucket https:
You only have:
And to explain a little what you are doing (and do not fully understand: () ...
With git tfs fetch -all "you retrieve a set of TFS changes for all branches, but do not merge (or restore) your local branch. Therefore, they do not appear in your local branch. You can see the DAG with the command to better understand:
git log --oneline --graph --decorate
The above 'git tfs pull' merges the fetched commit with your branch to make it good!
"git status" tells me there is nothing to do
This command shows you files that have been modified in the working directory. So, it is normal that you do not see any changes. This suggests that your commit was not pulled out!
And when I try to push this set of changes to BitBucket, git tells me there is nothing to do.
You must have! Are you sure you defined your remote control in your bitbucket repository? (see above) Which command are you using? What will git tell you?