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

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

git pull doesn't update immediately remote repo

When I create a branch in Bitbucket (always using develop as the origin branch) I go to my terminal, checkout to develop and perform a git pull.

The command pulls all the changes made and updates all the branches created by other developers except for the one I recently created.

Then I have to be using git pull for about 20 or 30 minutes receiving the message "Already up to date." until suddenly it starts tracking the branch I created.

This happens specially with repos cloned using https.

Is there some kind of cache data using https which takes a long time to update the data?

Do I have some wrong configuration on my local set-up? It seems I'm the only one on my team seeing this.

1 answer

0 votes
Caroline R Atlassian Team Sep 22, 2021

Hi, @Juan Martinez! Welcome to the community! 

In order to further investigate this case, could you please confirm the exact commands that you are using during this process, including how you are creating the branch?

Also, instead of creating the branch locally and then pushing this to the remote repo, I understand you are creating the new branch on your remote repo and then pulling this information to your local repository, is that correct? If that’s the case, could you give me more details about your business case for that?

Thank you! Feel free to share any additional information regarding this case. 

Kind regards,
Caroline

Hi Caroline,

Yes that's correct I'm creating the branch in the remote repo and then trying to pull the info to my local repo.

I create the branch from the Jira ticket, which basically opens Bitbucket and then I create the branch there.

Most of the times I'm working on "old-feature-branch" for example, so after creating the branch in Bitbucket I use:

git checkout develop

Once in develop I use:

git pull

This is where everything new in the remote repo is updated, except for the recently created branch.

When creating the branch I always use develop as base, I have tried with different servers and using https and ssh to clone the repo.

If you need more details please let me know.

Hi, Juan! Thank you for the additional details.

In fact, when you create a remote branch and run just a git pull, if you run git branch, you won't be able to see this branch on your repo. However, if you run git branch -r, you should be able to see this branch on the remote (-r will show you all the remote branches). 

So, in order to be able to work on this branch on your local repository, you will need to "checkout" the new branch. If you access your branch on your remote repository, you will see the Check out button. Click on this option and it will open a window with the following command, so you can just copy and paste this on your local repository: 

git fetch && git checkout {branch_name}

Image: 

Screen Shot 2021-09-27 at 4.40.59 PM.png

I hope this helps, but do let me know if you face any obstacles. 

Kind regards,
Caroline

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,806 views 10 16
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