0

I have performed a git pull into my local repository and I received a conflict in the log/development.log file

Auto-merging log/development.log
CONFLICT (content): Merge conflict in log/development.log
Automatic merge failed; fix conflicts and then commit the result.

I do not have much experience with GIT and fixing conflicts. Any advice on how to go about this?

1615903
  • 28,988
  • 11
  • 62
  • 87
zurik
  • 451
  • 1
  • 8
  • 21

4 Answers4

3

add all log files to .gitignore

      log/*.*
Sachin Singh
  • 7,167
  • 5
  • 37
  • 75
1

You should to add log folder in .gitignore. it's not best practice to stash log over git.

You can use "git gui" for conflict resolve.

but need to install git-gui.

$ sudo apt-get install git-gui
Pravin Mishra
  • 7,934
  • 4
  • 35
  • 48
0

You probably have made some local modifications that haven't been pushed.

Best way to go is to pull your remote in a different branch if you are having trouble.

Log files are likely to be modified all the time (that's what they're here for ^^). Take it out of the repo and you should be fine.

Edit : Or as suggested, use git-mergetool. It gives you more precise control on how the files will be merged.

xShirase
  • 11,210
  • 3
  • 47
  • 82
0

Fix conflict by using "git mergetool" and then continue.

On Linux a very good tool is meld:

git config --global merge.tool meld

Claudio
  • 10,108
  • 3
  • 29
  • 69