Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gerrit will not push. Error: No common ancestry

Tags:

git

gerrit

Trying to push to gerrit. Brings up no common ancestry.

nolan@nolan-pc:~/pac-man$ git push ssh://[email protected]:29418/android_vendor_pac HEAD:refs/for/pac-6.0
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 6.63 KiB | 0 bytes/s, done.
Total 8 (delta 0), reused 0 (delta 0)
remote: Processing changes: refs: 1, done    
To ssh://[email protected]:29418/android_vendor_pac
 ! [remote rejected] HEAD -> refs/for/pac-6.0 (no common ancestry)
error: failed to push some refs to 'ssh://[email protected]:29418/android_vendor_pac'
like image 439
Ýäbøî Ňôlåň Avatar asked Oct 15 '25 18:10

Ýäbøî Ňôlåň


1 Answers

I know this is a long time, but in my case, I used automatic rebase from gerrit interface to resolve simple conflicts. Maybe this introduce some changes between my local repository and the server one.
I simply had to sync with git to get those updates.
Using the git pull --rebase origin master worked for me.

like image 97
Alchimic Avatar answered Oct 17 '25 09:10

Alchimic