1

I have conflicts when trying to merge a pull-request on github where the repo is clonable from https://github.com/my_production_repo/my_app.git.

So following their docs, I tried to run this on my local (productio_repo)

git checkout -b tmp master
git pull https://github.com/my_forked_repo/my_app.git master

Then I have some conflicts to fix. The issue is that some of the conflicts are related to byte-code files. I want to force my local files to be overwritten by the files from the my_forked_repo, I tried this

git merge -s recursive -X theirs https://github.com/my_forked_repo/my_app.git master

but I got https://github.com/my_forked_repo/my_app.git - not something we can merge

user1611830
  • 4,749
  • 10
  • 52
  • 89
  • 2
    You're being led astray by `git pull`. The `pull` command is just a convenience shortcut for two separate commands: `git fetch`, which is what lets you retrieve commits from another repository (such as the fork) into your own repo, and `git merge`, which requires that you work with commits in your own repo. You cannot provide a URL to `git merge`, only to `git fetch`. – torek Jul 28 '16 at 04:29
  • probably you could try [this](https://stackoverflow.com/a/35442565/2303202). Note that one is edited for handling whole directory, for single file the first version is better – max630 Jul 28 '16 at 19:33

1 Answers1

0

If its not many files, you can try use git reset HEAD byte-code.file on all of them.

And remember you need to commit your changes before merge, maybe then it would work.

RaV
  • 1,029
  • 1
  • 9
  • 25