REPO (aosp) switch between branches
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have some issues in understanding how repo works, specifically how to switch between branches.
I did
repo init -u https://android.googlesource.com/platform/manifest
and then
repo sync
.
Based on my understanding my repo branch should be on master, but when I run
repo branch
the output is no branches
.
I want to know how can I switch between branches. Should I run
repo init
and repo sync
every time I want to switch branch (repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
) or is there any similarity with git flow (git checkout <branch>
). How can I create new local branch for developing?
Thanks for help.
android repo
add a comment |
I have some issues in understanding how repo works, specifically how to switch between branches.
I did
repo init -u https://android.googlesource.com/platform/manifest
and then
repo sync
.
Based on my understanding my repo branch should be on master, but when I run
repo branch
the output is no branches
.
I want to know how can I switch between branches. Should I run
repo init
and repo sync
every time I want to switch branch (repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
) or is there any similarity with git flow (git checkout <branch>
). How can I create new local branch for developing?
Thanks for help.
android repo
add a comment |
I have some issues in understanding how repo works, specifically how to switch between branches.
I did
repo init -u https://android.googlesource.com/platform/manifest
and then
repo sync
.
Based on my understanding my repo branch should be on master, but when I run
repo branch
the output is no branches
.
I want to know how can I switch between branches. Should I run
repo init
and repo sync
every time I want to switch branch (repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
) or is there any similarity with git flow (git checkout <branch>
). How can I create new local branch for developing?
Thanks for help.
android repo
I have some issues in understanding how repo works, specifically how to switch between branches.
I did
repo init -u https://android.googlesource.com/platform/manifest
and then
repo sync
.
Based on my understanding my repo branch should be on master, but when I run
repo branch
the output is no branches
.
I want to know how can I switch between branches. Should I run
repo init
and repo sync
every time I want to switch branch (repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
) or is there any similarity with git flow (git checkout <branch>
). How can I create new local branch for developing?
Thanks for help.
android repo
android repo
edited Nov 25 '18 at 15:01
usil
asked Nov 25 '18 at 8:57
usilusil
453618
453618
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
repo doesn't use branches the same way git does. With repo, you are not on a branch until you start a unit of work with the "repo start" command. repo start puts you on a dev branch based on the head of the branch you specified with the -b option in your repo init command. Once you're done with a local dev branch and you either repo prune it or repo abandon it, you go back to a no branch state (or it can also say you are detached, it means the same thing).
So, if I am on the head of-b android-4.4.4_r2
and then I runrepo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or allsync
process will begin from the start and overwrite my working directory?
– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466008%2frepo-aosp-switch-between-branches%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
repo doesn't use branches the same way git does. With repo, you are not on a branch until you start a unit of work with the "repo start" command. repo start puts you on a dev branch based on the head of the branch you specified with the -b option in your repo init command. Once you're done with a local dev branch and you either repo prune it or repo abandon it, you go back to a no branch state (or it can also say you are detached, it means the same thing).
So, if I am on the head of-b android-4.4.4_r2
and then I runrepo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or allsync
process will begin from the start and overwrite my working directory?
– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
add a comment |
repo doesn't use branches the same way git does. With repo, you are not on a branch until you start a unit of work with the "repo start" command. repo start puts you on a dev branch based on the head of the branch you specified with the -b option in your repo init command. Once you're done with a local dev branch and you either repo prune it or repo abandon it, you go back to a no branch state (or it can also say you are detached, it means the same thing).
So, if I am on the head of-b android-4.4.4_r2
and then I runrepo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or allsync
process will begin from the start and overwrite my working directory?
– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
add a comment |
repo doesn't use branches the same way git does. With repo, you are not on a branch until you start a unit of work with the "repo start" command. repo start puts you on a dev branch based on the head of the branch you specified with the -b option in your repo init command. Once you're done with a local dev branch and you either repo prune it or repo abandon it, you go back to a no branch state (or it can also say you are detached, it means the same thing).
repo doesn't use branches the same way git does. With repo, you are not on a branch until you start a unit of work with the "repo start" command. repo start puts you on a dev branch based on the head of the branch you specified with the -b option in your repo init command. Once you're done with a local dev branch and you either repo prune it or repo abandon it, you go back to a no branch state (or it can also say you are detached, it means the same thing).
answered Nov 25 '18 at 19:41
Greg MoensGreg Moens
70519
70519
So, if I am on the head of-b android-4.4.4_r2
and then I runrepo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or allsync
process will begin from the start and overwrite my working directory?
– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
add a comment |
So, if I am on the head of-b android-4.4.4_r2
and then I runrepo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or allsync
process will begin from the start and overwrite my working directory?
– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
So, if I am on the head of
-b android-4.4.4_r2
and then I run repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or all sync
process will begin from the start and overwrite my working directory?– usil
Nov 25 '18 at 20:10
So, if I am on the head of
-b android-4.4.4_r2
and then I run repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1 && repo sync
in the same working directory, this will then just download additional manifest file and files for android version 5 or all sync
process will begin from the start and overwrite my working directory?– usil
Nov 25 '18 at 20:10
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
Everything will happen in your current working directory. repo will attempt to warn you if any of your work will be lost and may prompt you to use the --force-sync option. To be completely safe, I would suggest making sure your working directory is clean (no dev branches, no modified files). Use repo status to check before doing a repo init.
– Greg Moens
Nov 25 '18 at 20:23
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466008%2frepo-aosp-switch-between-branches%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown