21

I'm always having a hard time merging branches on GitHub. I admit I'm not that versed in Git CVS so I rather use visual tools like GitHub Desktop and GitHub Website to accomplish my goals.

The way I've defined our dev process is to have 3+N branches:

  1. master - represents production environment
  2. staging - represents staging environment
  3. development - main development branch from where we all create feature/bug/hotfix branches

So whenever one wants to develop something, they create a branch off of development and start implementing it.

When development is done, their feature branch is then merged back into development and if all goes well, development branch is then merged into staging for testing.

I understand that since we don't do any specific testing on development branch that we could easily discard it and we'd only work with master and staging branches to accomplish for the same. Staging branch is actually being tested. Mildly, but still is.

Now I have a developer that has now created two features and each time I was merging a pull request into development I had issues merging it. The problem is I don't know how to actually see the issues on the web (comparing branches for instance) to tell the guy how to do things so I can do actual work than manage our code repo. It's frustrating at least...

So whenever I create a pull request. GitHub tells me, that I have some merge conflicts that can't be automatically resolved, but how do I see these?

Actually given my visual tools, what is the best way for me to resolve issues?

Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
  • Is there any reason why you can't do `git merge` locally? This would show you all the conflicts. You can abort the merge afterwards. If you choose to keep the merge and resolve the conflicts, you can then push the branch back to GitHub, and the merge button will turn green indicating that it can do the merge on the remote. – Tim Biegeleisen Aug 26 '15 at 09:14
  • @TimBiegeleisen: Ok? But how do I do that in GH Desktop? If I make a pull request it's immediately sync'd to GitHub, because I can immediately see it on the web. – Robert Koritnik Aug 26 '15 at 09:21
  • I prefer using the Git command line tool. Are you unable/not wanting to use this? I always found GitHub to be lacking when I needed fine-grain resolution about what was happening. Typically GitHub expects the person doing the merge request to do his due diligence and make sure that all conflicts are resolved. – Tim Biegeleisen Aug 26 '15 at 09:30

1 Answers1

7

I'm not sure if this helps but GitHub has recently released conflict resolution on the web interface:

github merge conflicts

If you use pull requests, this will be able to help quite a lot. If you don't (bummber) then it might be an overkill to open the pull request just to see the conflict. The good thing is that unless you have complex conflicts (renamed/moved files) this will not only show the conflict but prompt you to solve it.

Hope this helps.

bitoiu
  • 6,893
  • 5
  • 38
  • 60