Hi there, I'm pretty new to GIT and Bitbucket and I have run into a problem because I'm new to this. My repo on bitbucket is not in sync with my local but when I'm trying to push my local repo to bitbucket it says everything is the same so nothing happens.
Everything was working fine until Git was telling me I couldn't push, being sure of what I thought was the solution I force pushed to bitbucket.
The force didn't do what I expected, on bitbucket I have 4 commits with the last one on the 13th of may. So by force pushing it didn't push my last commit but it somehow removed a few commits.
Locally I see 10 commits with the last one today. When I try to push it again it says there are no changed even though the commits are different and the code should be too.
I don't know exactly what I've done wrong an how I can solve this so that the commits I see locally are also on bitbucket.
Hope someone can help me with this,
Thanks in advance,
Have all the files been staged and commited? You can get the status of your local repository and see how your local project is progressing in comparison to your Bitbucket repo. If there are any untracked files, that means that Git does not see them as part of a previous commit and thus, they'll be invisible for Bitbucket. To check the status you can use:
If there are untracked files, you'll need to tell Git to track them. To do so use:
git add <file_name>
Now that all your files have been staged, you can commit them and then push using:
git push origin master
To learn more, please visit Copy your git repository and add files.
If get status was not showing any differences between your local repo and Bitbucket, please let us know so we can help you further.
Thanks for your help, I always use
git add .
to track my files, and as you suggested I tried
but this is the reply
On branch master
nothing to commit, working tree clean
This is my local log in my phpstorm editor:
And these are my commits in bitbucket.Any idea on how to get them synced again?
No nothing was changed but I tried different stuff yesterday and got it solved.
I first reset my local repo to the point where my remote repo at bitbucket was at. I then added, committed and pushed everything from local to bitbucket.
Then on my own remote server I fetched, and reset --hard to get this one in sync aswell.
So everything is working perfectly now. Still don't know where the M-aster came from. I tried to reproduce it but that didn't work.
Well thanks a lot for all help!
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 ...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot