'git pull' request are not working for repo in stash 1.2

We have four developers working in stash 1.2. Two of the developers are about 7 commits behind the current git head. When I do a "git pull", I expect that those 7 commits will get pulled, but in fact nothing happens.

Performing a new clone on the repo results in all the commits to be pulled, as expected.

The other two developers have not had this issue, ie they were able to pull the commits without errors. As I mentioned previously, the workaround is to do a new "git clone".

Summary

Doing a "git pull" shows "Already up-to-date." which is wrong.

4 answers

0 votes
Jason Hinch Atlassian Team Oct 25, 2012

git pull is just a shortcut for a git fetch followed by a git merge of the checkout branch with its remotely tracked branch. This may be occurring if there are difference in the branches which are currently checked out by different developers or if they have different remotely tracked branches.

Lets say you want to make sure you have the latest master from the remote repository. You first check you are on master:

git branch

Then you can fetch and merge the latest from the remote repository:

git fetch
git merge origin/master

If you still are experiencing problems I would suggest contacting http://support.atlassian.com/ as it may require more information for us to diagnose the problem

Yes, I tried 'git fetch' as well, with the same result.

Jason Hinch Atlassian Team Oct 25, 2012

The important step is the git merge. git fetch only updates the remote branches. I would suggest getting in contact with support

0 votes

Hi Tim,

Could you please run:

git fetch -v
git branch -r -v

Fetch will retrieve all the changes, `git branch -r -v` will show you the remote branches you track in your local repository including the commit they point to.

This list should match the latest changes that are on the Stash server.

If this list of commits is correct then your local branches need to be updated to reflect those changes, but retrieving the changes actually worked.

Let me know if you see the latest changes on the remote tracking branches.

Cheers,

Stefan

We had already run fetch with no effect. I talked with the affected devs and they have already cloned new repos, so we'll have to wait until it happens again to try more diagnostics.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

427 views 6 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you