我有一些项目想上传到我的Bitbucket私人资料库。我执行了以下步骤,但出现错误。
使用以下命令将我的项目转换成Git格式:
git init
接下来:
git add
git commit -m "some message"
我创建了一个Bitbucket仓库,版本控制系统是GIT。
然后我输入以下内容(当然要填写实际的账户名、仓库名称以及所有者):
git remote add origin https://<repo_owner>@bitbucket.org/<accountname>/<reponame>.git
- 最后,
git push -u origin master
我做了这一切,但我的终端显示了这个错误:
To https://bitbucket.org/milosdev_me/lfs.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://milosdev_me@bitbucket.org/milosdev_me/lfs.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.