Difference between revisions of "ROM Android: Kernel MediaTek"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 31: | Line 31: | ||
Unpacking objects: 100% (2472039/2472039), done. | Unpacking objects: 100% (2472039/2472039), done. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | 2 down vote accepted | ||
+ | |||
+ | |||
+ | If you place the .pack files inside the .git/objects/pack/ directory of a newly git init'd repository, you should be able to git checkout -b somebranch ANYSHA1. | ||
+ | |||
+ | For example: | ||
+ | |||
+ | # find a commit: | ||
+ | faux@reg:~/git% git rev-parse HEAD | ||
+ | 6f5e880c68099b185e60b2492c75e506e16d8292 | ||
+ | faux@reg:~/git% cd .. | ||
+ | |||
+ | # init: | ||
+ | faux@reg:~% git init bar | ||
+ | Initialized empty Git repository in /home/faux/bar/.git/ | ||
+ | |||
+ | # add packs: | ||
+ | faux@reg:~% cp git/.git/objects/pack/* bar/.git/objects/pack | ||
+ | faux@reg:~% cd bar | ||
+ | |||
+ | # checkout: | ||
+ | faux@reg:~/bar% git checkout -b somebranch 6f5e880c68099b185e60b2492c75e506e16d8292 | ||
+ | Switched to a new branch 'somebranch' | ||
+ | |||
+ | # done! | ||
+ | faux@reg:~/bar% ls | ||
+ | abspath.c | ||
+ | contrib | ||
+ | ... | ||
+ | |||
+ | share|improve this answer | ||
+ | |||
+ | answered Feb 18 '12 at 21:36 | ||
+ | FauxFaux | ||
+ | 1,24429 | ||
+ | |||
+ | |||
+ | |||
+ | Thank you very much for the detailed steps. I was struggling for the last one week. But now I am able to get the files. Will I be able to fetch/push/pull to the remote repository now? Do i need to make any changes in the .git directory to connect to the remote repository? How do I be able to switch to a branch that is available in the remote repository? Do I need to copy any files? Thank you very much again. – user917279 Feb 19 '12 at 7:55 | ||
+ | |||
+ | |||
+ | Actually I tried a git init and a git reset --hard, after git status reported me that the files were deleted. But your approach looks clean. – user917279 Feb 19 '12 at 8:08 | ||
+ | |||
+ | |||
+ | You should now be able to git remote add -f origin url://to/remote/repository, then git remote update will happily download very little (hopefully!), and you'll be able to continue as normal. – FauxFaux Feb 19 '12 at 13:28 |
Revision as of 21:54, 2 January 2015
- https://android.googlesource.com/kernel/mediatek/
- https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r4
- https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3
Download dengan cara
cd ~ git clone https://android.googlesource.com/kernel/mediatek
Hasilnya akan di simpan di folder
cd ~ mediatek
Unpack source code
cd ~/mediatek/.git/objects/pack ls
Akan keluar dua file
pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.idx pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
Unpack objects dengan cara
cd ~/mediatek/.git/objects/pack git unpack-objects < pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
Akan keluar sampai 100%
Unpacking objects: 100% (2472039/2472039), done.
2 down vote accepted
If you place the .pack files inside the .git/objects/pack/ directory of a newly git init'd repository, you should be able to git checkout -b somebranch ANYSHA1.
For example:
- find a commit:
faux@reg:~/git% git rev-parse HEAD 6f5e880c68099b185e60b2492c75e506e16d8292 faux@reg:~/git% cd ..
- init:
faux@reg:~% git init bar Initialized empty Git repository in /home/faux/bar/.git/
- add packs:
faux@reg:~% cp git/.git/objects/pack/* bar/.git/objects/pack faux@reg:~% cd bar
- checkout:
faux@reg:~/bar% git checkout -b somebranch 6f5e880c68099b185e60b2492c75e506e16d8292 Switched to a new branch 'somebranch'
- done!
faux@reg:~/bar% ls abspath.c contrib ...
share|improve this answer
answered Feb 18 '12 at 21:36 FauxFaux 1,24429
Thank you very much for the detailed steps. I was struggling for the last one week. But now I am able to get the files. Will I be able to fetch/push/pull to the remote repository now? Do i need to make any changes in the .git directory to connect to the remote repository? How do I be able to switch to a branch that is available in the remote repository? Do I need to copy any files? Thank you very much again. – user917279 Feb 19 '12 at 7:55
Actually I tried a git init and a git reset --hard, after git status reported me that the files were deleted. But your approach looks clean. – user917279 Feb 19 '12 at 8:08
You should now be able to git remote add -f origin url://to/remote/repository, then git remote update will happily download very little (hopefully!), and you'll be able to continue as normal. – FauxFaux Feb 19 '12 at 13:28