I'm trying to migrate from TFVC (Visual Studio Team Services) to git (hosted via Visual Studio Team Services). I've been able to build a script which migrates all the stuff, branches, does some cleanup etc. I used git tfs (https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md) and a few online blog posts.
Everything works like a charm except when I try to cleanup commit messages I get a "fatal: bad revision s/^git-tfs-id:.*$//g" using the command from the doc
git filter-branch -f --msg-filter 'sed "s/^git-tfs-id:.*$//g"' -- --all
I've been trying to play around with the regex, it doesn't solve the issue. After digging a lot on the internet I still can't understand why it's not working properly. I'm using git for windows command line (latest version) and my knowledge of git is pretty basic, but I couldn't find any alternative to achieve what I want to do.
Thanks for your help!
Finally found what the actual issue was... A quote issue
git filter-branch -f --msg-filter 'sed "s/git-tfs-id:.*//gm"' -- --all
doesn't work
git filter-branch -f --msg-filter "sed 's/git-tfs-id:.*//gm'" -- --all
works
I guess there is an compatibility issue between the interpretation of quotes of windows command line and Git virtual bash.
Regardless thanks @Giuseppe Ricupero for your help!