Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pushing to a remote branch named different than the local branch is not memorised

Ferdinando Papale
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2024

I am trying to push to a remote branch that has a different name than the local branch. The problem is that every time I click on the "Push" button in the interface I need to specify the remote branch again. 
If I used the same name for the remote branch and the local branch this does not happen. 

 

This is happening with Sourcetree 4.2.8 on Mac

1 answer

0 votes
Fabio Racobaldo _Catworkx_
Community Champion
April 8, 2026

Hi @Ferdinando Papale and welcome,

 

when your local branch name and remote branch name are the same, Git automatically sets an upstream branch the first time you push. After that, a plain Push works.

When the names are different, Git does not automatically remember the mapping unless you explicitly tell it:

  • Local branch: feature/my-work
  • Remote branch: origin/FEATURE-123

Without an upstream configured, Git has no idea by default where “Push” should go — so Sourcetree keeps asking you every time.

This is Git-level behavior, not a Sourcetree bug.

Hope this clarifies,

Fabio

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events