
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Git challenged (maintaining an Android build)
Shawn Brown writes:
> Hi,
>
> I want to build Android from source overtime as it changes. I also
> need to add in the Google applications that I can pull from my phone
> now but aren't in the Android source (there is other proprietary stuff
> for the camera and audio etc that isn't in source).
>
> How can I do that in Git. I really don't have my head around this.
1. clone the git repository
2. switch to a new branch, say 'git checkout -b mystuff'
3. cp the files you need into place
4. add them with 'git add .'
5. git commit -m "added my files"
6. fix up the build infrastructure
7. git commit -a -m "build infra changes to support my version"
Then when there's a new version
8. git fetch $ANDROID-REPO master:master
9. git rebase master
Fix any conflicts (these should be very few as you describe your
scenario) and commit any changes.
Note that after step 2 you never leave your branch. That's why in
step 7 you 'fetch' rather than 'pull' (pull would proceed to merge;
this should work just as well, except that any changes you make to
your private configuration over time get spread out in history; the
fetch-and-rebase method clumps them together at the recent end of
history).
It's possible that there's an even simpler way to do this:
1. clone the git repository
2. cp the files you need into place
3. add them with 'git add .'
4. git commit -m "added my files"
5. fix up the build infrastructure
6. git commit -a -m "build infra changes to support my version"
Then when there's a new version
7. git pull --rebase
I haven't tried this myself, though (it's a relatively new option).
> I'm on the cupcake branch now but when things go over to donut, then
> I'll need to reapply the same changes to build files and include the
> same packages for addition.
1. git fetch $ANDROID_REPO donut
2. git rebase --onto donut cupcake master
should do the trick.
> Sorry if this seems like a simple question but even after reading how
> people advise using branches to select just the essential of something
> they developed, I'm not sure in a simple case like mine if that is the
> best. I mean I'm going to have uncommitted stuff when/if I go to
> switch branches.
"Uncommitted"? Why? Do you mean "unpushed"?
Home |
Main Index |
Thread Index