How to use my changes to merge in git?

How to force "my changes" when merging in git? Someone put all bin directories in git, and now I have a terrible merge conflict :(

Now he says the following:

When you solve this problem run "git rebase -continue". if you would rather skip this patch, run git rebase -skip instead. to restore the original branch and stop the rebasing run "git rebase-abort".

I DO NOT want to merge, I just want to delete all these files using my changes.

EDIT: . Most files have been successfully merged either through automatic merging, or due to the absence of conflict. However, some of them still exist, as well as the following.

warning: it is not possible to combine binary files: CSI / reports / object / Debug / TempPE / GroupMailDS.Designer.cs.dll (HEAD versus the added gitignore)

+3
source share
3 answers

I am not 100% sure about this, but I think this is a good case for this:

git merge otherbranch -s recursive -X ours

This command attempts to merge a topic branch into a selected branch using a recursive strategy. The -X ours option is a subset of the recursive strategy that automatically resolves conflicts, making the assumption that your trusted branch is authoritative.

+8
source

You can:

  • git rmdirectory obj(which contains all these binaries and should not have been committed first)
  • .gitignore, , - obj git status ( )
  • git push, , , "obj" Git (, ).

, :

  • Git
  • git push -f ( ) "" Git, reset .

, , .

+1

I assume that you can simply replace your binaries with yours (since no merging is really possible) or just git rm unwanted binaries. After you are done, just git rebase -continue

0
source

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


All Articles