Reverting back to a previous kernel version
I have the kernel 2.6.38-utrace which is having the utrace support in it. I want to provide the utrace support for 2.6.29.6 kernel. My plan is to revert back the 2.6.38-utrace kernel to 2.6.29.6 using git and finding a diff between them and usi开发者_高级运维ng it as a patch.
I am new to git. Can sombody kindly tell me the way to do this
Go back to the commit for Linux 2.6.29.6. Let's suppose it's 8e0ee4
(actually, that's 2.6.29):
git checkout 8e0ee4
Git will tell you you're now in a "detached HEAD state"; that's ok. Make a branch for your changes:
git checkout -b 2.6.29+utrace
Then use git log
, GitHub or a GUI tool to find the commits that pertain to utrace support and use git cherry-pick
to lift those into the current branch.
You can simply do a
git diff version1..version2
Hope this helps
精彩评论