Reputation: 123
I have configured a local bit repository and have several test commits with files in it.Status is available as follows.
I have a Bitbucket account and created a new repository and I have given the link of it.
Then I tried to push the content of local git to remote repository in Bitbucket. But I get an error message.
How to get this sorted? Thanks in advance for any help!!!
Upvotes: 0
Views: 622
Reputation: 522762
If I read the error message correctly, it looks like there are commit(s) on the remote branch which you don't have locally. Try pulling first:
git pull -u origin master
Then try your push:
git push -u origin master
Upvotes: 1
Reputation: 744
Follow these commands.
git add .
git commit -m "your commit message"
git push -u origin master.
if any changes were not pulled initially u need to pull first
git pull -u origin master
Upvotes: 0
Reputation: 626
Your have to fetch first the changes from the remote repository and the push
again.
git fetch origin master
git checkout master
Take a look here https://blog.plover.com/prog/git-ff-error.html
Upvotes: 1