first commit
This commit is contained in:
28
快速解决no_common_ancestry.txt
Normal file
28
快速解决no_common_ancestry.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
# 快速解决 "no common ancestry" 错误
|
||||
|
||||
## 方案一:合并远程历史(推荐)
|
||||
|
||||
cd /d/zhini/zhini_im
|
||||
|
||||
# 1. 暂存子模块更改(如果不想提交)
|
||||
git stash
|
||||
|
||||
# 2. 拉取远程内容
|
||||
git fetch gerrit master
|
||||
|
||||
# 3. 合并远程历史
|
||||
git merge gerrit/master --allow-unrelated-histories
|
||||
|
||||
# 4. 推送到评审队列
|
||||
git push gerrit rjb_dev:refs/for/master
|
||||
|
||||
## 方案二:强制推送(如果远程只有空提交)
|
||||
|
||||
cd /d/zhini/zhini_im
|
||||
|
||||
# 1. 暂存子模块更改
|
||||
git stash
|
||||
|
||||
# 2. 强制推送(覆盖远程)
|
||||
git push gerrit rjb_dev:refs/heads/master --force
|
||||
|
||||
Reference in New Issue
Block a user