我正在开发一个flutter应用程序,并试图将我的代码发送到bitbucket。我做了以下步骤。
repository.
bitbucket并创建一个新项目,在该项目下,一个新的
https://abcd@bitbucket.org/abcd/my_project.git
现在我得到以下错误
To https://bitbucket.org/abcd/my_project.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/abcd/my_project.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.为什么会发生这种情况?我已经在上述步骤中使用了git pull origin master!
发布于 2021-09-03 11:21:35
问题是存在一个非同步文件.gitignore。这不是默认情况下的。所以我不得不
git add .gitignore和
git commit -m "message"发布于 2021-07-30 06:50:27
你应该依靠一个不那么复杂的过程来做同样的事情。
请试一试:
git clone https://abcd@bitbucket.org/abcd/my_project.git
cd my_project
cp -rv <MY_SOURCES_PATH>/* .
git add --all
git commit -m "A comment"
git push如果有用的话请告诉我。
致以问候。
https://stackoverflow.com/questions/68586508
复制相似问题