设置了一个git克隆,以支持推送/拉回到原始存储库。如何使用git-remote (和/或其他命令、配置文件等)更改两个存储库,使得原始存储库现在将像克隆一样,默认情况下推送和拉入其中,而克隆现在将作为原始存储库,而不知道克隆?
发布于 2009-02-16 18:11:15
在以前的遥控器上发出以下命令:
% git remote add origin user@machine:/path/to/repo
% git config branch.master.remote origin
% git config branch.master.merge refs/heads/master
% git pull然后在旧克隆上:
% git remote rm origin发布于 2009-02-16 18:13:02
您只需编辑两个存储库中的.git/config文件,并更改远程“源”的"url“。
因此,您可以使用git-config命令(有关选项,请参阅man )来更改git存储库的全局选项。
https://stackoverflow.com/questions/554011
复制相似问题