LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 01-17-2022, 12:14 AM   #1
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Rep: Reputation: Disabled
Couldnot switch from master branch to other stable branch in AOSP


I have downloaded AOSP master branch using repo.
But now I want to switch that workspace to any previous Android 11 or 10 before starting to make any changes in the workspace.
I am issuing the following commands but could not do that.

$ git init
$ git remote update
$ git fetch
$ git fetch --all
$ git checkout android-11.0.0_r48
error: pathspec 'android-11.0.0_r48' did not match any file(s) known to git.

and when I want to see the list of branches it displayed nothing.
$ git branch


Note: I downloaded the source using repo commands. Couldn't I switch to another branch using git. If so how to switch to another existing branch, avoiding complete download.

Anybody please help.
 
Old 01-17-2022, 03:05 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
1) I don't see git clone among your git commands. What remote repository are you tracking?

2) android-11.0.0_r48 is just a tag that refers to a commit, not at the tip of any named branch. By checking it out you're detaching HEAD at it. See DETACHED HEAD in the git-checkout man page.
 
Old 01-20-2022, 12:39 AM   #3
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
Sorry Shruggy,

I used these following commands to download the master branch of Android Open Source Project

Code:
repo init
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync
Now I want to switch from master branch to Android 11/10/9 in the same workspace directory.
I have not made any changes or initiated any compilation tasks in that directory I downloaded.
What I have to do
1)to avoid downloading all the files from the beginning for the Android versions I want to switch and
2)to download only the required missing files
3)the non relevant files already available if any as residue after switching should not result errors in compilation or the final output files.

Do the following commands sufficient for my needs?

Code:
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r48
repo sync
Please reply.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Dev branch Fedora 32 versus Dev branch Ubuntu 20.04 in relation with KVM Hypervisor LXer Syndicated Linux News 0 03-20-2020 12:31 AM
Need Advice Concerning Testing Branch and Unstable Branch kevinbenko Debian 3 12-28-2017 06:45 AM
LXer: Switch to Overcloud with Network isolation been setup via Tripleo Master branch LXer Syndicated Linux News 0 09-19-2016 10:20 AM
LXer: Android AOSP Leader Quits Over Binary GPU Drivers LXer Syndicated Linux News 0 08-07-2013 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration