Search code examples
phplinuxgitsshmergetool

Better tool for managing git merge conflicts ssh and windows


Ok so my setup is we have 2-3 devs setup on github, my live server is on a digital ocean droplet (believe its a VPS) and i access it via putty SSH on my windows machine.

I have tried to use linux merge tool but i am sure there is better options out there. Is there a windows application out there that can connect via SSH and allow me to resolve conflicts in a GUI application. I don't mind if i have to pay for it as long as its not too expensive i.e $10-20 a month or under $200.

I have PHP Storm and was planning to use source tree for version control as that seems pretty good from what ive seen but i couldnt find anything to suggest either could do it. If that's not possible or easy i would settle for a good tutorial that would allow me to use mergetool better.

My big pain was i had some massive files and i just wanted to concentrate on the parts, when i use '[c' hotkey it seems to bring me to every single change. There's probably a few more hotkeys that would make it much simpler but my real preference is for windows software that i can manage this in a GUI as its too easy to make a mistake in the cluncky editor.


Solution

  • Any fully featured git client will allow you to do a merge between branches.

    Get the branches to be merged

    • pull both branches you need to merge together
      • after cloning make sure your feature branch is visible under "Branches"
        • if they are not listed click on "origin" under "Remotes"
          right click the branch you need
          then click "Checkout " + [insert branch name here] + " ..."

    Merge the branches

    • select the branch that will have changed will be merged into.
      • double clicking on the name under "Branches" will do this for you.
    • right click the branch with changes to be merged
    • click "Merge " [insert branch name here] + " into current branch"
    • a dialog will appear to confirm your action click ok.

    Dealing with conflicts

    • because you have conflicts a new dialog will appear close this window and
    • select the file status tab at the bottom of the interface.
    • right click on the files that have conflicts
    • go into the "Resolve conflicts" submenu
    • choose any option.
      • I have several external editors installed so I clicked "Launch external merge tool"

    Selecting your external diff tool

    • Kdiff3 is a fine choice
    • [TortoiseGit] is a more complete git solution but much more than you need for this.
    • click tools -> options
    • click diff
    • in section External Diff/Merge choose your poison
      • note: it will display every option even if it is not installed
        if it cannot find the executable in program files it will ask you on dialog exit.

    Hope this helps.