Some git notes or future reference:
Get all changes between two tags that modify certain files.
FILES=$(git diff --name-only remotes/origin/aosp-new/ics-mr1-release ics | grep -i blue)
git log --no-merges --stat remotes/origin/aosp-new/ics-mr1-release..ics ${FILES}
Replace AOSP repository with one from CodeAurora
cd external/bluetooth/bluez
git remote add ca git://codeaurora.org/platform/external/bluetooth/bluetooth.git
git fetch ca
git checkout ca/jb
cd ../../..
cd frameworks/base
git remote add ca git://codeaurora.org/platform/frameworks/base.git
git fetch ca
git checkout ca/jb
cd ../..
cd system/bluetooth
git remote add ca git://codeaurora.org/platform/system/bluetooth.git
git fetch ca
git checkout ca/jb
cd ../..
Show all branches that contain a commit:
git branch --contains [commit]
Extract folder into different branch with subtree and eliminte project from parent:
git subtree split -d --prefix=[ path ] -m "splitted" -b [ branch ]
git clone -b [ branch ] . temp
git filter-branch --tree-filter 'rm -rf [ path ]' HEAD
git commit -m "eliminated [ path ] from project history"
cd temp
git remote rm origin
git remote add origin
git branch -m [ branch ] master
git push origin master
cd ..
rm -rf temp
git gc --prune=0
git push -f origin master
Eliminate a Commit from branch:
NOTE: make sure the commit referenced by some other branch first, unless you really wanna loose it
git rebase --onto 8c2d4feb4~1 8c2d4feb4 master
git push -f origin master