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

Initializing git-flow with different name for productive branch fails

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • None
    • 2.7.6
    • Git
    • OS: macOS High Sierra 10.13.4 (17E199)

      Nothing installed, it's a fresh MacBook Pro, just installed Xcode and SourceTree.

    • Severity 2 - Major

      We are using different git-flow naming, so when checking out a new projet I always checkout both the "stable" branch (our develop) and the "productive" branch (our master), which I did this time, too. But since 2.7.6 it's failing (might be a little earlier, but not too much earlier, since it worked about a month ago).

      Now when trying to initialize git-flow, I get the following error:

       

      git init -d 
      Using default branch names.
      Fatal: Local branch 'master' does not exist.
      Which branch should be used for bringing forth production releases?
       - productive
       - stable
      Branch name for production releases: [master] 
      Completed with errors, see above

       

      As you can see, it tries to use the default branch names, although I specified different ones like so:

        1. 1z0-1001-Exam-Questions.pdf
          274 kB
        2. 1z0-1002-Exam-Questions.pdf
          238 kB
        3. 1z0-1005-Exam-Questions.pdf
          245 kB
        4. 1z0-1007-Exam-Questions.pdf
          242 kB
        5. 1z0-1009-Exam-Questions.pdf
          245 kB
        6. 210-060-Exam-Questions.pdf
          371 kB
        7. 500-325-Exam-Questions.pdf
          232 kB
        8. 7120x-Exam-Questions.pdf
          340 kB

            [SRCTREE-5798] Initializing git-flow with different name for productive branch fails

            Fix available in version 4.2.6. Kindly upgrade to latest version.

            Arati Mohanty added a comment - Fix available in version 4.2.6. Kindly upgrade to latest version.

            @stan.derksen I know, but it's still better than manually creating a "develop" branch, hoping the implemented "git-flow" works, and then manually changing the config file to match the branches that are actually used... given the time this issue has been reported, and no update since then, I will gladly take a "git-flow init" terminal command over the above.

            nxtcristian added a comment - @stan.derksen I know, but it's still better than manually creating a "develop" branch, hoping the implemented "git-flow" works, and then manually changing the config file to match the branches that are actually used... given the time this issue has been reported, and no update since then, I will gladly take a "git-flow init" terminal command over the above.

            @nxtcristian, that's a workaround. Not a solution.

            stan.derksen added a comment - @nxtcristian, that's a workaround. Not a solution.

            Use Sourcetree's integrated terminal:

            Last login: Tue Oct 10 11:01:57 on console
            user@user-iMac ~ % cd /Users/user/project-name
            user@user-iMac project-name % git-flow init 
            
            
            Which branch should be used for integration of the "next release"?
               - staging
               - feature/awesome-feature
            Branch name for "next release" development: [] staging
            
            
            How to name your supporting branch prefixes?
            Feature branches? [feature/] 
            Release branches? [release/] 
            Hotfix branches? [hotfix/] 
            Support branches? [support/] 
            Version tag prefix? [] 
            user@user-iMac project-name %
            

            You can then use git-flow from Sourcetree normally

            nxtcristian added a comment - Use Sourcetree's integrated terminal: Last login: Tue Oct 10 11:01:57 on console user@user-iMac ~ % cd /Users/user/project-name user@user-iMac project-name % git-flow init Which branch should be used for integration of the "next release" ?    - staging    - feature/awesome-feature Branch name for "next release" development: [] staging How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? [] user@user-iMac project-name % You can then use git-flow from Sourcetree normally

            This issue still exists in 2023. It has been 5 years...

            stan.derksen added a comment - This issue still exists in 2023. It has been  5 years ...

            Just ran into this. And, `git flow init` in Terminal doesn't work for me. It looks like I don't have `git flow` installed.

            For now, I will just keep doing things by hand.

            Andrew Predmore added a comment - Just ran into this. And, `git flow init` in Terminal doesn't work for me. It looks like I don't have `git flow` installed. For now, I will just keep doing things by hand.

            jquentin added a comment -

            Bug is still here.

            jquentin added a comment - Bug is still here.

            It's almost 2022, and still waiting for a fix!

            Hassen Charef added a comment - It's almost 2022, and still waiting for a fix!

            Reproduced with version 4.0.1 in MacOS 10.15.4.

            The workaround as told is running the `git flow init` command in the Terminal.

            benjavalero added a comment - Reproduced with version 4.0.1 in MacOS 10.15.4. The workaround as told is running the `git flow init` command in the Terminal.

            same to me! thank you! i fixed it by 'git flow init' thank you Dominique Pijenburg and Evgeny

            jinzhen Feng added a comment - same to me! thank you! i fixed it by 'git flow init' thank you Dominique Pijenburg and Evgeny

              43c951f935c6 Raman Sidarakin (Inactive)
              dafb672b6911 Cihat Gündüz
              Affected customers:
              9 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: