Chinaunix首页 | 论坛 | 博客
  • 博客访问: 329547
  • 博文数量: 83
  • 博客积分: 3193
  • 博客等级: 中校
  • 技术积分: 1679
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-03 12:04
文章分类

全部博文(83)

文章存档

2013年(2)

2012年(6)

2011年(72)

2010年(2)

2009年(1)

分类: LINUX

2011-01-06 16:16:33

*. How to create patch in GIT pro?
1.git pull
2.Edit the files
3.git diff > name.patch


*. How to land patch:
1.git add                                    (if the file is not a new fone, ingore this step)
2.git commit -m "add ior-survey.sh into lustre/test" lustre/tests/ior-survey.sh
3.git push


*.How to get project
git clone --origin prime git://git.lustre.org/prime/lustre.git
  or
git clone --origin prime git@git.lustre.org:prime/lustre.git
cd
git clone --origin hsm git@git.lustre.org:hsm/lustre.git HSM
The "--origin prime" option is just a reminder that this is the official repo source. You'll see this name in the remote branch list below.

Set up other remote tracking branches you may want. First see what's available:

git branch -r
 prime/b1_6
 prime/b1_8
 prime/b_release_1_6_7
 prime/b_release_1_8_0
 prime/b_release_1_8_1
 prime/master

Then set up local copies of the branches you are interested in. For example:

git branch b1_8 prime/b1_8
git branch b_release_1_8_1 prime/b_release_1_8_1
...

You can then switch amongst the branches with:

git checkout b1_8

Or you can do the above two steps (i.e. set up the remote tracking branch and switch to it) in one operation with:

 git checkout -b b1_8 prime/b1_8


*. Make patch:
git status
git add file
git diff HEAD > vim-cocoa.patch

*. See the landing date:
"git show --pretty=fuller commit"

*.To reset the code to the latest commit
git checkout -f


阅读(983) | 评论(0) | 转发(0) |
0

上一篇:copy of Wiki

下一篇:How to check kernel dump file

给主人留下些什么吧!~~