Repository do not show changes

screen.png

Hey,

 

I have a problem with SourceTree, I can't push my files anymore (I could push it but it doesn't appear on bitbucket repository). =(

I commited and pushed it 2 times (fine) and on the third time I commited and pushed it again but on bitbucket I have only 2 commits and the third doesn't show up my code did not change too.

I don't know what origin/master master or HEAD means, because it is the first time I work with it.

2 answers

This widget could not be displayed.

I am not a Git expert but master is the latest revision on your local copy and origin/master is on Bitbucket in your case. Since HEAD is ahead of master, it would not be pushed. You should be able to check out master while keeping your local changes and re-commit on master to move it forward. Then you can push master to Bitbucket. Please make sure you have a backup copy before trying this.

This widget could not be displayed.

It sounds like you checked out and committed to HEAD. This is an incorrect usage of Git. You should have received a warning from SourceTree about a "disconnected HEAD" whenever you checked it out.

You can fix this by checking out "master", then right-clicking the top commit and choose "Reset current branch to this commit...", then choose "Hard" in the dialog. This should put master on the same commit as HEAD, and you can then push master to origin/master.

FYI, "master" is the pointer to the latest commit in your LOCAL master branch. "origin/master" is the pointer to the latest commit in the REMOTE master branch (specifically the remote named "origin").

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,310 views 8 11
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