Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't disable remote tracking for out-of-sync local branch

I have a local branch named cache-transformations. that has diverged from its remote tracking branch as shown: 

$ git status
On branch cache-transformations
Your branch and 'vaio-vzome/cache-transformations' have diverged,
and have 1 and 1 different commits each, respectively.

I want to disable remote tracking for the cache-transformations branch. When I right click on it and select "Track remote branch >", all of the options are grayed out, presumably because it's the active branch, so I check out a different branch (master) and now the remote tracking branches for cache-transformations are no longer grayed out. I scroll to the bottom of the list and select "(None)", expecting to disable remote tracking for that branch, but instead, I get the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch vaio-vzome cache-transformations:cache-transformations
From file://DHALLW7X64/Users/DHall\Documents/GitHub/vzome
! [rejected] cache-transformations -> cache-transformations (non-fast-forward)

If I perform the same operation on a different branch that is tracking a branch on the same remote, but is in sync, everything works as expected. I can disable and re-enable remote tracking on it.

If the remote computer (DHALLW7X64) is turned off when I issue the command, Sourcetree sits waiting, trying to find the unavailable remote until I cancel the command.

So I have a few questions:

  1. How can I disable remote tracking for the cache-transformations branch without syncing it to the remote first.
  2. Why is it even necessary to communicate with the remote repository before disabling remote tracking? Isn't that just a local configuration setting? What could I do if the remote was permanently out of service?
  3. Why are all of the remote tracking options (including "(None)") grayed out for  my active branch? Shouldn't "(None)" be always enabled, even for the active branch?

Note that the remote named vaio-vzome in this case is a shared folder on DHALLW7X64 which is another computer my local network. I don't think that has any bearing on the problem, but I thought it is worth mentioning since it's not a typical public http based git repo.

I'm running Sourcetree version 2.4.7.0 on Windows 10. 

Thanks in advance for any suggestions.

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
minnsey Atlassian Team Jan 18, 2018

Hi this looks like a bug, I've raised it here: https://jira.atlassian.com/browse/SRCTREEWIN-8314

For now see the following instructions to do the same from the command line https://stackoverflow.com/a/3376017/1297975

Thanks Michael. I was able to disable the remote manually with these commands:

git config --unset branch.cache-transformations.remote
git config --unset branch.cache-transformations.merge

Now, when I look at the "Track remote branch >" sub-menu for the cache-transformations branch, all of the options are grayed out. Any idea why? Is it because it has diverged from the remote branch with the same name? They are all grayed out for the active branch too, but it's in sync with its remote. Is this a separate new bug?

Thanks again.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,329 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you