How to use my changes for merge in git?

淺唱寂寞╮ 提交于 2019-12-04 13:02:56

I'm not 100% confident about this, but I think this is a good case for this:

git merge otherbranch -s recursive -X ours

That command attempts to merge the topic branch into your checked out branch using the recursive strategy. The -X ours option is a subset of the recursive strategy that automatically resolves conflicts by making the assumption that your currently checked out branch is authoritative.

VonC

You can:

  • git rm the obj directory (which contains all those binary files and shouldn't have been committed in the first place)
  • add a .gitignore directive to make sure any future obj directory won't appear in the git status (and won't be added)
  • git push that new tree, helping to propagate the fact that 'obj' directory should disappear from other Git repos as well (hence triggering no merge at all).

If you can have the consent of all the other participants, you could:

But since it involves replacing published history by a new one, it should be done only if the other users agree.

I guess you can just replace their binaries with yours (since no merge is really possible) or just git rm the unwanted binaries. After you have done, just git rebase --continue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!