git push doesn't update to latest set of files on a repo branch

I have a master branch. My colleague forked this, and made some changes to some of the html files. Her and I worked on separate files at the same time.

She's since done a compare and git pull, and has also done a

  • git add .
  • git commit -m "commit message"
  • git push -u origin master

But her repository on bitbucket does not show the latest update of files.

I understand that when there is a working tree that by design, git doesn't push updated files, and there is some way of forcing it or something? Or perhaps there's more to this?

Any advice?

1 answer

This seems unusual. Check the following:

git status

Make sure that the files that were changed aren't sitting waiting to be added still.

git log --stat

To see what files were changed in the commits, going backward from the most recent.

git config -l

Be sure that the user is pushing to the correct repo. Their config should look similar, but with the correct owner and repo name filled in.

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@bitbucket.org:{username}/{repo slug}.git

On Bitbucket, be sure to check the commit view to see if the most recent commits there match what is local

https://bitbucket.org/{username}/{repo slug}/commits/all

Also, check to be sure the user isn't working in a branch. More information on branches and how to view them can be found here.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,758 views 1 5
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