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

git flow fails to initialize with non-default production and development branches

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 1.6.3.1
    • 1.6.2.2
    • Git
    • None

      1. Open a repository that has a master branch
      2. Initialise repository for git flow
      3. For Production branch change "master" to "production"
      4. For Development branch change "develop" to "master"
      5. Click OK
      6. From Repository menu select "Start New Release" under "Git flow / Hg flow"
      7. Enter a release and click OK
        EXPECT: Release branch created
        ACTUAL: error
        git release start v1
        fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.
        Completed with errors, see above
        

      NOTE: the configuration file does not look right:

      [gitflow "branch"]
      	master = master
      	develop = master
      

      But the same error occurs after changing this to:

      [gitflow "branch"]
      	master = production
      	develop = master
      

      Initialising git flow with the defaults does work.

          Form Name

            [SRCTREE-1696] git flow fails to initialize with non-default production and development branches

            KieranA added a comment -

            We now produce an error if the branch doesn't yet exist to say this process won't carry on. git-flow-init wrongly just carries on processing even under invalid circumstances. Git flow can't assume from what point to create a branch, the branch must already exist, hence why this problem is happening. Users should always create the branches they'll be using in git-flow before initialising git-flow. This is very important.

            KieranA added a comment - We now produce an error if the branch doesn't yet exist to say this process won't carry on. git-flow-init wrongly just carries on processing even under invalid circumstances. Git flow can't assume from what point to create a branch, the branch must already exist, hence why this problem is happening. Users should always create the branches they'll be using in git-flow before initialising git-flow. This is very important.

              Unassigned Unassigned
              mmangier Malik Mangier (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: