jav*_*iry 8 git branch remote-branch git-branch
我有 2 个分支命名developer和Current远程。在本地,我在分支上工作,developer并将更改推送到 remote developer。问题是,如何从本地推developer送到远程Current?
我试过这些:
git push origin Current -f
// error:
// src refspec Current does not match any.
// failed to push some refs to ...
// and this one too:
git config push.default upstream
git push origin Current -f
// error: same as the first try
// and this one too:
git branch --set-upstream-to developer origin/Current
// or:
git branch --set-upstream-to developer Current
// error: fatal: branch 'Current' (or 'origin/Current') does not exist
Run Code Online (Sandbox Code Playgroud)
mu *_*u 無 17
你可以做:
git push origin developer:current
Run Code Online (Sandbox Code Playgroud)
这会将分支developer从本地存储库推送到current远程存储库上的分支。如果您要覆盖分支电流的更改,您还需要使用该-f标志。
FWIW,做一个git push origin :current(注意:before current)将从current远程删除分支。
| 归档时间: |
|
| 查看次数: |
5779 次 |
| 最近记录: |