git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.45k stars 1.24k forks source link

How to use custom merge tool? #918

Closed NikKovIos closed 6 months ago

NikKovIos commented 1 year ago
image

Is there a possibility to set custom merge tool? For example https://www.sublimemerge.com/

lucasderraugh commented 1 year ago

I'd have to look at the code to see how we treat "Git Tool".

prostolyubo commented 6 months ago

I can confirm it works fine. You just need to configure your git tool in gitconfig and set the "Git tool" option in gitup. See the proper configuration in your software of choice. I for example use meld:

[merge]
  tool = meld
[mergetool]
  prompt = false
[mergetool "meld"]
  trustExitCode = true
  cmd = open -W -a Meld --args --auto-merge \"$LOCAL\" \"$BASE\" \"$REMOTE\" --output=\"$MERGED\"
NikKovIos commented 6 months ago

Did you place that code in git config? Where? Could you write more detail please?

prostolyubo commented 6 months ago

Did you place that code in git config? Where?

Yes, in the global gitconfig that can be found at ~/.gitconfig (if it is not there just create it). If it has some contents just append to it.

Could you write more detail please?

There is not much more to add as the instructions vary sligntly per program. The best approach is just to google "How to set X as merge tool in git" and follow the instructions. Open (or create) the .gitconfig file and paste what's necessary. Here is the config for the mentioned sublime merge (the setup is even simplier than for meld) https://forum.sublimetext.com/t/how-to-use-as-a-git-mergetool/39341 And you can also setup separate program for diff viewing too in the same way.

I suggest to close this issue as it has nothing to do with GitUp.