3

When I make a git pull --rebase, this is what I can see when I try to resolve conflicts in a json file:

version https://git-lfs.github.com/spec/v1  
Updated upstream  
oid sha256:daa8dd3be5413def66d9a12df3c011c6f1d2dbc459bdb4cbf2b5e5ed3fd7d752  
size 612325  
=======  
oid sha256:6d8dfa7c7b06fa7d7c50889d111aa50bcdf12c7535222cc007012bebdda61d17  
size 622401  
Stashed changes  

After researches, these are lfs pointers. But I can't find any solution to resolve my conflicts. I got the same thing when I make a git diff. I would like to see the content of the files, not pointers

Anyone could help me?

Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143
mhamon
  • 31
  • 2
  • What happens when you do `git mergetool` ? Is it a huge json ? It's not a 'standard' file to be put on LFS. – Pedro Witzel Jul 30 '20 at 07:47
  • Nothing's wrong when i do git mergetool. Yes the json is quite big, it seems that's what happens with lfs when a file is big. But this is not convenient to resolve conflitcts – mhamon Jul 30 '20 at 07:52
  • This is what appears after git mergetool : Merging: test/***.json Normal merge conflict for 'test/***.mat': {local}: modified file {remote}: modified file The merge tool bc3 is not available as 'bcompare' – mhamon Jul 30 '20 at 08:07
  • instead of pull rebase/merge you could create a local branch then fetch remote dir, after this do a diff between the two conflictual versions (your local update and the remote version you just fetched) use either cli or tools like: meld, kdiff, vimmdiff etc.. this will help you figure out what's going on – jo_ Jul 30 '20 at 08:14
  • Thanks for the answer but i don't think it will change anything. I will still have the same diff with pointers. Or there is something that I don't understand – mhamon Jul 30 '20 at 08:28
  • you could check out the remote branch and put the file aside (i.e. copy it to a different folder) than compare with yours. when you checkout a branch it "populates" the lfs files with pointers with the file content. – A-_-S Jul 30 '20 at 15:20
  • I will try that. But I have a lot of json files concerned by this 'problem', it will take a lot of time to do this for each file. – mhamon Jul 30 '20 at 15:55
  • you can set .json files not to be in lfs – A-_-S Jul 30 '20 at 16:23
  • How can i do that? Is it okay to have some files in lfs and others not? – mhamon Jul 31 '20 at 07:13
  • anyone has a solution for this? – Dave Jan 04 '22 at 15:30
  • Does this answer your question? [Resolving a Git conflict with binary files](https://stackoverflow.com/questions/278081/resolving-a-git-conflict-with-binary-files) – bolov Mar 02 '22 at 19:59

0 Answers0