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
  • 32,635
  • 12
  • 70
  • 99
zurik
  • 491
  • 1
  • 8
  • 21

4 Answers4

3

add all log files to .gitignore

      log/*.*
Sachin Singh
  • 7,107
  • 6
  • 40
  • 80
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
  • 8,298
  • 4
  • 36
  • 49
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,975
  • 4
  • 53
  • 85
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,614
  • 4
  • 31
  • 71