[英]Overwrite remote repo with local
I currently have a local repo temp3
that was created by running git svn clone
. 我目前有一个本地回购
temp3
是通过运行git svn clone
创建的。 Someone else has created a remote repository called SS
. 有人创建了一个名为
SS
的远程存储库。 The two are not related (from a git perspective), however, they are both generated from the same SVN repo (at different points of time). 两者不相关(从git的角度来看),但是它们都是从相同的SVN存储库(在不同的时间点)生成的。 I would like to overwrite
SS
with temp3
on the remote server. 我想用
temp3
在远程服务器上覆盖SS
。 Is this possible? 这可能吗? Below is what I tried
以下是我尝试过的
git push -f -v --repo=address
It came back with an error 回来有一个错误
The current branch master has no upstream branch
Then it said to use --set-upstream
instead of --repo
and -f
. 然后,它说使用
--set-upstream
代替--repo
和-f
。
Any help would be appreciated. 任何帮助,将不胜感激。
Thanks. 谢谢。
try this 尝试这个
git push -f remote_address
git push -f remote_address
You need to add the remote of your second repo 您需要添加第二个仓库的遥控器
git remote add <repo2> <url>
Once you have multiple remotes you can push to any of the give remotes. 一旦拥有多个遥控器,就可以推送到任何给定遥控器。
git push -f repo1 master
git push -f repo2 <branch>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.