Programming/Linux_Kernel
git 에서 수정사항에 대한 patch file 만들기
decdream
2010. 9. 8. 14:33
git 에서 아래와 같은 수정사항이 있을때
system.h
universal.h
의 수정사항만을 patch 파일로 만든다고 한다면,
linux-2.6.32]$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: C110_Attach.cmm
# modified: arch/arm/kernel/traps.c
# modified: arch/arm/mach-s5pv210/include/mach/system.h
# modified: arch/arm/mach-s5pv210/include/mach/universal.h
# modified: drivers/rb_dump/rb_dump.c
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
...
no changes added to commit (use "git add" and/or "git commit -a")
다음 커맨드로 가능하다
이렇게 입력하면 서버 버전과 나의 수정사항에 대한 diff 를 patch file 형태로 만들어 준다.
git diff arch/arm/mach-s5pv210/include/mach/system.h arch/arm/mach-s5pv210/include/mach/universal.h > kernel_rst_flag.patch
system.h
universal.h
의 수정사항만을 patch 파일로 만든다고 한다면,
linux-2.6.32]$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: C110_Attach.cmm
# modified: arch/arm/kernel/traps.c
# modified: arch/arm/mach-s5pv210/include/mach/system.h
# modified: arch/arm/mach-s5pv210/include/mach/universal.h
# modified: drivers/rb_dump/rb_dump.c
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
...
no changes added to commit (use "git add" and/or "git commit -a")
다음 커맨드로 가능하다
이렇게 입력하면 서버 버전과 나의 수정사항에 대한 diff 를 patch file 형태로 만들어 준다.
git diff arch/arm/mach-s5pv210/include/mach/system.h arch/arm/mach-s5pv210/include/mach/universal.h > kernel_rst_flag.patch