Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sourcetree fails to pull from "main" branch

Alec Miller February 22, 2022

Where I've renamed "master" to the more PC "main" branch name, the source tree "pull" button/action now does nothing.  No failure messages either.  Repos that still use "master" pull fine. 

Workaround: I have to go to terminal and run "git pull" there.  

 

2 answers

0 votes
alecazam February 28, 2022

This seems to keep occurring.   A "main" tag is added somewhere (not sure if it's github or Sourcetree) adding this.  The tag isn't updated to reflect the latest change, and then the "main" branch and "main" tag disconnect.   "main" tag is many revisions behind, and Sourcetree stops it's "Pull" at the tag instead of latest "main" branch.  "git pull" from the command line on the other hand pulls latest.

Deleting the tag on the origin branch was just a temporary fix.

0 votes
alecazam February 26, 2022

I think this may be caused by having a remote tag also called main.  I ran the following to the remote host to clear up the confusing.  I was also hitting problem trying to branch with ambiguity of the "main" branch.  Now I seem to be able to pull and branch properly from the UI.  I hope this helps others, since I saw many posts trying to solve this in various ways that don't work.

git tag -d main

git push origin :refs/tags/main

in my case the second needed to be the following to destroy the tag on github

git push https://personalaccesstoken@github/username/repo.git :refs/tags/main

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events