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

default push branch is always "origin" instead of actual tracked branch

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 1.9.1
    • 1.9.0
    • Git
    • None

      In the new commit screen,
      "Push changes immediately to..." option defaults to the origin remote instead of the branch on the forked remote it's tracking.

      This was working in 1.8.x, where the tracked branch is selected as the default, and "create a pull request" will initiate a PR against the origin remote.

          Form Name

            [SRCTREE-2272] default push branch is always "origin" instead of actual tracked branch

            frankleng added a comment -

            Awesome. thanks so much!

            frankleng added a comment - Awesome. thanks so much!

            The reason this worked in 1.8 is actually because you could change the target remote manually which then found the tracked branch; we've simplified this now but 1.9.0 wouldn't find tracked branches on forks where the push mode was upstream/simple. This is fixed for 1.9.1 which now checks all your remotes for tracked branches before defaulting the push target.

            Steve Streeting (Inactive) added a comment - The reason this worked in 1.8 is actually because you could change the target remote manually which then found the tracked branch; we've simplified this now but 1.9.0 wouldn't find tracked branches on forks where the push mode was upstream/simple. This is fixed for 1.9.1 which now checks all your remotes for tracked branches before defaulting the push target.

            I presume you're using 'upstream' or 'simple' as the 'Push branches:' option? Git's default 'matching' push branch mode means tracking is only used for pull, but since you said this worked in 1.8 I assume you've already changed this mode.

            Testing this it appears that upstream etc does work for pushing to alternate branches but only within the origin remote, tracking a different remote (fork) indeed doesn't switch correctly. I'll check this out.

            Steve Streeting (Inactive) added a comment - I presume you're using 'upstream' or 'simple' as the 'Push branches:' option? Git's default 'matching' push branch mode means tracking is only used for pull, but since you said this worked in 1.8 I assume you've already changed this mode. Testing this it appears that upstream etc does work for pushing to alternate branches but only within the origin remote, tracking a different remote (fork) indeed doesn't switch correctly. I'll check this out.

              Unassigned Unassigned
              90bfbff2259e frankleng
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: