3: Pushing to TFS
> git tf checkin –deep –autosquash
Hooray! Success… I think!
3a. Troubleshooting “git-tf: Could not lock” error:
PreReq Step 5, on post 1 (creating your project in TFS), was missed.
3b. Troubleshooting “git-tf: ‘refs/heads/master’ is not a valid ref” error:
Git-TF does not support TFS Branches (git-tfs does).
p.s.”>git tf checkin” only checks in your master branch (git tf bridge limitation)
3c. Troubleshooting “git-tf: cannot check in – commit [sha1] has multiple parents, please rebase to form a linear history or use –shallow or –autosquash” error:
Git-TF is nice enough to tell you there are 3 ways to workaround this:
- git rebase –i
- shallow clone
After using gitk to investigate the commit responsible for the error, I realize this goes back to the fundamental differences between how git & tfs work.
Commit 090b2de was a merge commit that combined separate work from 2 snapshots. A TFS branch can only have a linear history, so you must tell GIT-TF how to handle these, if you want to transfer the “deep” history (shallow will give you only the latest “snapshot” with no history).
3d. Troubleshooting “git-tf: cannot perform the initial check in against a non-empty folder. Destination needs to be empty, please configure your repository against another tfs folder” error:
Your project folder is not empty. See 2b – Note, in Part 2. You can re-run git tf configure to update the value.