Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, March 22, 2019

Git revert commands

# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD
# It also takes ranges. This will revert the last three commits:
git revert HEAD~3..HEAD
git revert --no-commit 0766c053..HEAD
git commit
This will revert everything from the HEAD back to the commit hash 0766c053

HEAD means the current version. 

More from this link: https://stackoverflow.com/questions/4114095/how-to-revert-a-git-repository-to-a-previous-commit





Sunday, January 23, 2011

Get Linux kernel Souce Code

1. use wget (you could get any version you want):
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.3.tar.bz2
or
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.gz

2. use git
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
$ cd linux-2.6
$ git reset --hard v2.6.17 /* Change current branch to 2.6.17 */
more details: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

Friday, January 21, 2011

How to use git

check out file:
git clone URL CurentFileName

more on: http://git-scm.com/

This is the tutorial of using git to check out linux kernel source:
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

install git on Cent OS 5.5

1. install webtatic: rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-0.noarch.rpm
2. continue with yum install: yum install --enablerepo=webtatic git-all
more detailed, please see following link: 
http://genomewiki.ucsc.edu/index.php/Installing_git