Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-2732

SourceTree should check out ref/HEAD instead of branch master

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 2.0.3
    • 2.0.2
    • Git
    • None
    • Version 2.0.2 (2.0.2)
      MacOSX 10.9.4

    Description

      When cloning a git repo with SourceTree, it always checks out the branch 'master' or whichever other I manually specify in 'Advanced Options', even if the ref/HEAD is configured to something else on the server. The command-line git however checks out the branch ref/HEAD is pointing to, e.g. 'develop'.

      We work with git-flow in our git repository. To prevent novices from doing accidental commits in the master branch, we have configured ref/HEAD (on the server) to point to develop instead of master. This way, when freshly checked out, they sit in 'develop' instead of 'master' and can only do minor harm.

      Unfortunately, SourceTree does not follow this rationale and always checks out 'master'. Even more unfortunately, there is no way for a git client to reliably recognize which workflow (like git-flow) is used on a repo, but that's totally different topic, just part of the motivation to change ref/HEAD to 'develop'.

      Attachments

        Activity

          People

            Unassigned Unassigned
            565574dcdedb Manuel Dejonghe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: