Splitting changes from CodeAuroraForum into Android Open Source Software by rebasing and branching

Here are some useful instructions on how to add some of the changes that CodeAuroraForum did to the Bluetooth stack on AOSP so they can be integrated into CyanogenMod. Don’t think you can ahead and do this without reading rebase docuemetation which can be find my doing

git rebase --help

$ git clone git://codeaurora.org/platform/external/bluetooth/bluez
$ cd bluez
$ git branch -a # look for the branch you want to take changes 
                # from, and the source branch
$ git checkout -b caf_jb origin/jb
$ git checkout -b aosp_jb origin/aosp-new/jb-release
$ git merge-base aosp_jb caf_jb # this will let you know what is 
                # the common ancestor you have between both 
                # branches
dfe961f591046174be590c46f7acfc674417f67e
$ git checkout caf_jb
$ git rebase -i dfe961f591046174be590c46f7acfc674417f67e

This will get you into the text editor so you can pick, squash, edit,etc it. Check the doc on how to rebase

You can use the following snippet to see what the changes are for each commit, so you can discard those that you don’t want:

for i in $(cat .git/rebase-merge/git-rebase-todo | grep pick | grep -v \# | awk '{ print $2}'); do git log -1 --summary  ${i} | less; done
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s