我目前有两个Git仓库,它们是在不同的时刻从同一个SVN仓库创建的。其中一个Git仓库位于本地(位于文件夹temp
),另一个是我已经克隆到我盒子上不同文件夹的远程仓库(SS
)。当地的回购是最新的回购。我怎样才能使用Git来更新远程仓库,只需要从远程仓库创建到今天的最新变化为止?合并同一个git仓库的两个版本
下面是我曾尝试
cd SS
git add remote temp ../temp
git fetch temp
结果:
warning: no common commits
remote: Counting objects: 77563, done.
remote: Compressing objects: 100% (25852/25852), done.
remote: Total 77563 (delta 42638), reused 75783 (delta 40858)
Receiving objects: 100% (77563/77563), 45.68 MiB | 1.23 MiB/s, done.
Resolving deltas: 100% (42638/42638), done.
我认为我需要做衍合,所以我打
git rebase master
结果:
Current branch master is up to date.
然后我被搞糊涂了,所以我做了
git status
结果:
On branch master
Your branch is up-to-date with 'origin/master'
nothing to commit, working tree clean
如果这事工作,我以为它会的方式,它应该有增量加入temp
从时间SS
创建至今。
我哪里错了?
如果'SS'回购没有改变,本地一个是一个最最新的,只是做'git push --force'。 – Eimantas