Comments on: Git branch / merge: not as easy as advertised /code/git-branch-merge-not-as-easy-as-advertised/ sealed abstract class drew {} Sun, 27 Mar 2016 22:51:38 +0000 hourly 1 https://wordpress.org/?v=4.4.15 By: Paolo G. Giarrusso /code/git-branch-merge-not-as-easy-as-advertised/comment-page-1/#comment-9837 Sat, 03 Aug 2013 16:50:31 +0000 /?p=1702#comment-9837 Those aren’t the only examples. You never needed to put Word/OpenOffice specs inside a repo? At my old company we ended up unpacking OpenOffice files (hey, they are ZIPs!) and storing them in the repo, but it’s not cool.

That’s one advantage for LaTeX or Markdown. However, standard merge drivers are inadequate there too, as soon as somebody hard wraps those files.

The thing is, before things where much worse.

Maybe it’s no big deal if what you are doing is pure curly braces source code.

Yep; layout-based languages are also mostly fine. But only git got there – branching with Subversion was much more painful, since SVN couldn’t figure out whether some changes on the branch had previously been merged. And that is why people praise git.

Moreover, even source code is not really fine – merge tools don’t understand the semantics of files. But “semantic merge” tools for different programming languages, solving that problem, are being investigated in academy.

]]>
By: Todd Hensley /code/git-branch-merge-not-as-easy-as-advertised/comment-page-1/#comment-8940 Mon, 15 Jul 2013 20:10:28 +0000 /?p=1702#comment-8940 I’m glad I’m not the only one who has these kinds of issues with merging and branching (regardless of the source control tool). Maybe it’s no big deal if what you are doing is pure curly braces source code.

If you have an IDE or some kind of visual designer storing things in a file, merging becomes a horrible prospect. Depending on how the tool feels like updating its file, it could be that your version of the file and my version of the file might as well have not even originated from the same ancestor. I get chills up my spine when I think about merging something like a BizTalk orchestration.

]]>
By: Ben Ford /code/git-branch-merge-not-as-easy-as-advertised/comment-page-1/#comment-8030 Thu, 02 May 2013 23:28:14 +0000 /?p=1702#comment-8030 The trick I’ve used to successfully merge .xib files, .pbxproj files, etc.. is this:

`git merge –no-commit -s recursive -X theirs `

The -“X theirs” tells git to favor “their” changes, which is the branch your merging from.

The other, far less elegant way I’ve done these is to reject the conflicted .pbxproj and .xib files, and manually copy them from the branch.

]]>
By: Nate West /code/git-branch-merge-not-as-easy-as-advertised/comment-page-1/#comment-8027 Thu, 02 May 2013 12:53:37 +0000 /?p=1702#comment-8027 After adding a .gitattributes and
`*.pbxproj binary merge=union`
I’ve never had problems with .xcodeproj merging.

.xibs, on the other hand….

It’s actually the first example on the Git Attributes page in the Pro Git book
http://git-scm.com/book/en/Customizing-Git-Git-Attributes

]]>
By: Andrew Stoeckley /code/git-branch-merge-not-as-easy-as-advertised/comment-page-1/#comment-8025 Wed, 01 May 2013 09:10:50 +0000 /?p=1702#comment-8025 Enlightening and entertaining, thank you. I knew there was a good reason I subscribed to this blog. I was very late to the git club, and started using it in Xcode only recently. I too found some alarming issues when incorporating branching and merging into my workflow. So I don’t use git for that. However, as a simple and highly effective “what has changed since my last commit??” test, it has added a lot of confidence to my workflow.

]]>