1

I did a migration from a TFVC branch(TFS 2013) to a git repository(TFS 2013) using git-tfs. It was pretty simple, just ran git-tfs on the TFVC branch, it created a local git branch which I pushed to a new git repository. Git-tfs created the complete history of the TFVC branch in the local git repository. It created git notes for linked work items as well and if I do a git log, I can see the linked work items under notes. Git log on source repository

These changes were pushed to a new git repository that I created on TFS 2013 only. I then cloned the new repository in a different folder on my computer. Now, when I do a git log, I don't see the notes neither do i see the notes in the git history in the browser. I can, however, see the individual notes by searching for the commit id of the note(I found the commits in the file .git/logs/refs/notes/commits in the source folder). I don't see the folder under the new git repository for some reason. I tried to fetch/pull the notes but it throws errors as in the image below: git pull error

I tried a few different commands but nothing seems to work. Any ideas/suggestions?

DevOpsy
  • 667
  • 1
  • 8
  • 18
  • It's probably because Git notes aren't pushed to / pulled from the remote repo by default. I'm not sure if there's an easy fix or a way to put the work item ID in the commit message instead of in the notes, though. It might be worth opening up an issue on the git-tfs GitHub repo. – Daniel Mann Sep 19 '18 at 00:46
  • The notes are pushed correctly. I can see them in the TFS web UI by searching for the commit id. Moreover, I tried doing a git clone --mirror and it fetches and shows(using git log) the notes correctly however I need it to work without using the --mirror either at the time of cloning the repository or later. – DevOpsy Sep 19 '18 at 01:48

1 Answers1

1

I can't say for your problem of fetching notes (because notes are not made to be pushed).

But, perhaps you could migrate again the history, this time using the option --export that is made to include the content of the notes in the commit messages.

Philippe
  • 28,207
  • 6
  • 54
  • 78
  • Thanks for the suggestion @Philippe, I am trying the migration with the --export option now however, I am interested in sorting out the notes issue as well. – DevOpsy Sep 20 '18 at 03:40