git branch kdsoo_branch
git checkout kdsoo_branch
git checkout master와 같이 하면 된다.
git merge kdsoo_branch
git branch -d kdsoo_branch
git branch -D kdsoo_branch
| Alcoholic Tux (2) | 2009/04/09 |
|---|---|
| Linux collaboration summit 2009 (0) | 2009/04/09 |
| GIT branch 사용 (0) | 2009/03/27 |
| Linux kernel 2.6.29 TUX to TUZ devil (0) | 2009/03/24 |
| Color temperature in kelvin for White Balance (0) | 2009/03/18 |
| Not to miss email sent to me on mailing list (0) | 2009/03/08 |
vi(vim)로 git repository 에서 작업하다 보면 터미널을 하나 더 띄우거나 쉘을 vim 에서 fork 해서 띄워서 git 을 확인해야 할 경우가 많다.
간편하게 vim plugin 으로 이 작업들을 해결 가능하다.
위의 repository 에서 받을수 있다.
주의할 점은 vim 7.1 이상만 지원하는 듯 하다.
plugin 디렉토리와 syntax 디렉토리가 있고 각각의 디렉토리 안에 .vim 플러그인들이 있다.
본인의 계정에
|
kdsoo@chromatix:~$ pwd |
기본 키맵은 다음과 같이 매핑 되어있다.
== Keymaps
[<Leader>gd] :GitDiff
[<Leader>gD] :GitDiff --cached
[<Leader>gs] :GitStatus
[<Leader>gl] :GitLog
[<Leader>ga] :GitAdd
[<Leader>gA] :GitAdd <cfile>
[<Leader>gc] :GitCommit
=== In git-status buffer
[<Enter>] :GitAdd <cfile>
쉽게 설명하면 vim 의 command mode, 즉 esc 를 한번 누른 상태에서
\gs
라고 입력하면 GitStatus 명령을 친것과 같이 동작한다.
즐거운 vi & git 생활 되시길.
| Working with ARM toolchain on OSX(intel) (0) | 2009/03/01 |
|---|---|
| omap3430 camera subsystem FPS check feature design (0) | 2009/02/25 |
| Vim with git plugin (git-vim) (0) | 2009/02/24 |
| git pull & patch 간략 정리 (0) | 2009/02/18 |
| Hello San Francisco. (0) | 2009/02/13 |
| vi 와 Linux programmer’s manual 연동 (0) | 2009/02/12 |
Tag : git, git-vim, Linux, vim
|
kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # # modified: arch/arm/mach-omap2/board-xxx.c # modified: arch/arm/mach-omap2/mux.c # modified: arch/arm/plat-omap/include/mach/mux.h # modified: drivers/media/video/xxxx.h # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # 090202 # work.patch # work.patch2 no changes added to commit (use "git add" and/or "git commit -a") |
modified 파일이 있으면 pull 이 안될수 있습니다.
| kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ git diff > work.patch |
패치가 work.patch 파일로 저장됩니다.
가장 마지막으로 pull 해왔던 상태로 리셋합니다.
| kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ git reset --hard |
이때 주의할것은 git status 에서 untracked file 이 있으면 리셋할때 파일이 지워집니다.
untracked file 이 없도록 commit 해놓고 reset 하세요.
| kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ git pull |
하시면 깨끗하게 최신으로 패치 됩니다.
|
| omap3430 camera subsystem FPS check feature design (0) | 2009/02/25 |
|---|---|
| Vim with git plugin (git-vim) (0) | 2009/02/24 |
| git pull & patch 간략 정리 (0) | 2009/02/18 |
| Hello San Francisco. (0) | 2009/02/13 |
| vi 와 Linux programmer’s manual 연동 (0) | 2009/02/12 |
| cscope with linux kernel source code (0) | 2009/02/10 |
Tag : git, git pull, kernel, Linux, Patch
Send me an instant message!