I've inhouse bitbucket server which hosts the vendor.git with our customizations. I've updated the local_manifest.xml and have built fresh android images. Now, someone has pushed some changes to our vendor.git and I want to pull those changes and rebuilt the android images to save hours of time.
How can I manually pull only the repos e.g. vendor, kernel,...?
I found this thread and tried doing repo sync
but git log
inside AOSP/vendor/ still doesn't show the latest commit and it tries to go and update all the index looks like.
CodePudding user response:
In your case, when the remote is not pointing upstream. You could try adding remote to your local directory and point it to your bitbucket repo manually and rebuilding.
user@ubuntu:~$ cd aosp/vendor
user@ubuntu:vendor$ git branch -a
* (no branch)
remotes/servername/master
remotes/m/release -> servername/master
user@ubuntu:vendor$ git remote show origin
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
user@ubuntu:vendor$ git status
Not currently on any branch.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ...
Untracked files:
(use "git add <file>..." to include in what will be committed)
...
no changes added to commit (use "git add" and/or "git commit -a")
user@ubuntu:vendor$ git ls-remote --heads
fatal: No remote configured to list refs from.
user@ubuntu:vendor$ cat .git/config <-- note the url
user@ubuntu:vendor$ git remote add origin ssh://[email protected]:1234/servername/vendor
user@ubuntu:vendor$ git remote show origin
* remote origin
Fetch URL: ssh://[email protected]:1234/servername/vendor
Push URL: ssh://[email protected]:1234/servername/vendor
HEAD branch: master
Remote branches:
master new (next fetch will store in remotes/origin)
user@ubuntu:vendor$ git checkout master
user@ubuntu:vendor$ git pull
user@ubuntu:vendor$ git log --online --graph