We are a team of 8-10 developers working on different parts of a Sitecore instance. In the past we've used SVN and more recently (and successfully) Hg, but are moving to using Git as our primary source control. We're working with Sitecore 7, and using the latest TDS from Hedgehog. In case it matters we're also using the Glass.Mapper.sc lib from Mike Edwards.

The problem we're running into, especially compared to how easy it was with Hg, is that merges are a nightmare. It doesn't help that most of our team is new to Git, but most of us have at least used Hg so it's not a huge leap. We've had so many problems that we moved to a merge-master setup, where the team leads are handling all the merges.

My question is this: From people using these tools, what would you suggest is the best workflow and supporting configuration? A team member suggested rebasing to reduce conflicts, but that doesn't seem to matter.

Our Hg workflow, which worked very well was: 1) Commit local changes as many times as needed. 2) Pull changes from the server, and update to the remote branch after any merge. 3) Sync TDS. We do this after the pull so that we're not overwriting the .scproj file in the merge 4) Commit the merge and TDS sync 5) Push the results back to remote

We didn't have merge nightmares and tds was kept very clean. We tried to adapt something similar with Git and have wasted a lot of time each week to resolve issues.

We currently have each dev working in their own branch because of the merge errors working with everyone in master. The type of merge issues I'm seeing seem to mostly come from what Git merges automatically. I definitely don't want to merge everything by hand every time, but I wouldn't mind doing project file merges by hand. We're using Sourcetree and I have BeyondCompare Pro.

Any suggestions, especially coming from successful implementations, would be greatly appreciated. If there are simply config changes that can be made or a change to our workflow to make the process more reliable I'd love to learn about them.

  • 6
    (yes, P.SE is the right spot for this question - see where does my git question go?) Do you branch locally? or do you commit to your local copy of the 'mainline' and then merge? How long is the period between the start of step 1 and the step 5?
    – user40980
    Commented Dec 23, 2013 at 22:43
  • 3
    What kind of problems did you have when you converted your Hg workflow? You can replicate that same workflow in git and "should" run into the same set of pains, rather than introducing new ones. Are people getting tripped up by the staging area model? i.e., where are those spurious merge problems coming from? Commented Dec 24, 2013 at 15:15
  • 1
    @Alex: The biggest problems are in the project files. We always had to be careful with Hg, but they're regularly blowing up with Git. Commented Dec 26, 2013 at 14:57
  • 1
    It was originally suggested by the only person on our team that had prior Git experience that we rebase whenever we would normally pull and merge in Hg. I've been doing a lot of reading on this, and I see there's a lot of argument about whether or not this is correct. Step one, I'm going to stop the rebasing and see if that resolves part of it. I found articles discussing a few TDS configuration changes and changes to the .gitignore that might also help. I'm going to try to get the workflow as close to what we did in Hg as possible, since the consensus is that the workflows should be the same. Commented Dec 26, 2013 at 14:57
  • 2
    @JonUpchurch -- Would you consider the project files to be 'derived'? I.e., could they be auto-generated as a post-fetch trigger rather than checked in? Commented Dec 26, 2013 at 15:02

1 Answer 1


So there's a lot of things in this question I don't know about, but I feel like proper application of a .gitattributes file might solve many of the conflicts. http://git-scm.com/book/ch7-2.html

For example, there are some files we have where people are always adding lines, rarely removing them. So a line in similar to *.tds merge=union can help take care of all the conflicts. Without understanding Sitecore and TDS a bit more I'm just guessing on your exact needs, but this hopefully should get you started down the right path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.