Git学习笔记(7) — 独立开发者所用的命令(c)
2012-08-07 10:30
295 查看
这次我们看一些实例
Use a tarball as a starting point for a new repository.
Create a topic branch and develop.
create a new topic branch.
revert your botched changes in curses/ux_audio_oss.c.
you need to tell git if you added a new file; removal and modification will be caught if you do git commit -a later.
to see what changes you are committing.
commit everything as you have tested, with your sign-off.
take the last commit back, keeping what is in the working tree.
look at the changes since the premature commit we took back.
redo the commit undone in the previous step, using the message you originally wrote.
switch to the master branch.
merge a topic branch into your master branch.
review commit logs; other forms to limit output can be combined and include –max-count=10 (show 10 commits), –until=2005-12-10, etc.
view only the changes that touch what’s in curses/ directory, since v2.43 tag.
Use a tarball as a starting point for a new repository.
$ tar zxf frotz.tar.gz $ cd frotz $ git init $ git add . //添加所有文件到index $ git commit -m "import of frotz source tree." $ git tag v2.43
Create a topic branch and develop.
$ git checkout -b alsa-audio (1) $ edit/compile/test $ git checkout -- curses/ux_audio_oss.c (2) $ git add curses/ux_audio_alsa.c (3) $ edit/compile/test $ git diff HEAD (4) $ git commit -a -s (5) $ edit/compile/test $ git reset --soft HEAD^ (6) $ edit/compile/test $ git diff ORIG_HEAD (7) $ git commit -a -c ORIG_HEAD (8) $ git checkout master (9) $ git merge alsa-audio (10) $ git log --since='3 days ago' (11) $ git log v2.43.. curses/ (12)
create a new topic branch.
revert your botched changes in curses/ux_audio_oss.c.
you need to tell git if you added a new file; removal and modification will be caught if you do git commit -a later.
to see what changes you are committing.
commit everything as you have tested, with your sign-off.
take the last commit back, keeping what is in the working tree.
look at the changes since the premature commit we took back.
redo the commit undone in the previous step, using the message you originally wrote.
switch to the master branch.
merge a topic branch into your master branch.
review commit logs; other forms to limit output can be combined and include –max-count=10 (show 10 commits), –until=2005-12-10, etc.
view only the changes that touch what’s in curses/ directory, since v2.43 tag.
相关文章推荐
- Git学习笔记(5) — 独立开发者所用的命令(a)
- Git学习笔记(6) — 独立开发者所用的命令(b)
- Git命令学习笔记
- github 学习笔记1--一些简单的git命令
- Git学习笔记:Git命令
- GIT学习笔记-命令基础-记录每次更新到仓库
- git 学习笔记3-常用命令
- Git学习笔记(主要是对一些命令进行记录。。)
- Git学习笔记_01(基本常用命令)
- Git学习笔记(九)---常用命令
- Git学习笔记(几个常用的命令 及 版本回退)
- Git 常用命令学习笔记
- 【Git/Github学习笔记】Git常用命令(代码冲突二)
- Git学习笔记(4) — 基本命令
- git 命令学习笔记
- GIT学习笔记-命令基础-查看提交历史
- 【学习总结】git命令集笔记
- git学习笔记(2)——git init命令选项说明
- git 学习笔记二-- 进阶命令的使用
- git学习笔记2-一些很重要又很初级的命令和技巧(霜之小刀)