When git tfs failed to create a merge commit, how to fix it

When git tfs failed to create a merge compilation, it says: warning: this changeset 7504 is a merge changeset. But it can't have been managed accordingly because one of the parent changeset 7494 is not present in the repository! If you want to do it, fetch the branch containing this changeset before retrying...

According to the documentation ,Note: if you see a warning, you could correct that by reseting the tfs remote to a previous commit. Then fetch the merged branch and retry to fetch the branch.

Can anyone think of reseting the tfs remote to a previous commit. Although, I now took the merged branch, I don’t understand how to reset its previous commit unsuccessful. I'm not sure, but do I need git checkout <hash of the previous commit>?

+4
source share
1 answer

Yes, now git-tfs are trying to create a merge commit when it encounters pluggable change sets (now that it has satisfactory branch support).

This message is only a warning message, and when you see it, you have 2 options ...

  • - , , , , , , , .

  • -, , . , .

reset tfs remote ( - , git -tfs , , -).

reset , reset-remote.

, branch --init.

Reset tfs (- git -tfs).

. , , git -tfs , git;)

,

git tfs clone https://CompanyName.visualstudio.com/DefaultCollection "$/CompanyName/Main" KfGitMain --workspace="C:\TFS\Main"
cd GitMain
git tfs branch --init "$/CompanyName/Release/20140121.1" live20140121.1
git tfs branch --init "$/CompanyName/Release/20140121.1-hotfix" hotfix20140121.1

- , ,

git checkout hotfix
git tfs reset-remote 5fb83335b8dfc6fbb96e0a54a48dc06c506e3277 ## previous commit of the first failed commit
git reset --hard tfs/hotfix
git tfs pull -i hotfix

git checkout live
git tfs reset-remote eba62a1446f3f81676d051336ca254fe54c37d74
git reset --hard tfs/live
git tfs pull -i live

git checkout master
git tfs reset-remote 72727737ec52f9b96d22d343770186a342c8b166
git reset --hard tfs/default
git tfs pull -i default

. / tfs, , , git clone --with-branches, ,

+2

Source: https://habr.com/ru/post/1534970/


All Articles