我尝试了很多事情,看了视频和教程,但没有任何帮助。我只是想在BitBucket上添加现有项目,并观察所有描述的步骤。但是我仍然遇到相同的错误:
! [rejected] master -> master (fetch first)
error: failed to push some refs to
'https://xxx@bitbucket.org/xxx/projet-gsb-php.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.
我什至删除了我的git本地文件夹,并按照以下步骤操作:
C:\wamp\www>cd GSB_AppliMVC
C:\wamp\www\GSB_AppliMVC>git init
(...)
C:\wamp\www\GSB_AppliMVC>git add -A
C:\wamp\www\GSB_AppliMVC>git commit -m "Initial Commit"
C:\wamp\www\GSB_AppliMVC>git remote add origin https://xxx@bitbucket.org/xxx/projet-gsb-php.git
C:\wamp\www\GSB_AppliMVC>git push -u origin master
(ERROR MESSAGE ABOVE)
我尝试将其推到GitLab上,但是存在完全相同的问题。所以肯定有一些明显的东西,但我真的不知道。
谢谢您的帮助
答案 0 :(得分:1)
C:\wamp\www
git clone https://xxx@bitbucket.org/xxx/projet-gsb-php.git
GSB_AppliMVC
复制到projet-gsb-php