我正在使用Git子树和我正在处理的几个项目,以便在它们之间共享一些基本代码.基本代码经常更新,升级可以在任何项目中进行,最终所有项目都会更新.
我遇到了一个问题,git报告我的子树是最新的,但是推送被拒绝了.例如:
#! git subtree pull --prefix=public/shared project-shared master
From github.com:****
* branch master -> FETCH_HEAD
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)
如果我推,我应该得到一个消息,没有什么可以推动......对吗?对?:(
#! git subtree push --prefix=public/shared project-shared master
git push using: project-shared master
To git@github.com:***
! [rejected] 72a6157733c4e0bf22f72b443e4ad3be0bc555ce -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:***'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about …Run Code Online (Sandbox Code Playgroud)