Linuxias
Developer's Delight
Linuxias
  • Category
    • AI
      • Deep Learning
      • Machine Learning
      • Data Science
      • Framework
      • MLOps
      • Paper-Review
      • Tips
    • Android
      • Kotlin
      • Component
      • Compose
      • Compose UI
      • Material
      • Testing
    • Software Architecture
      • Architecture Pattern
      • Design Pattern
      • Requirement Engineering
    • Linux
      • Compile & Link
      • Command & Tool
      • Container
      • Debugging & Testing
      • Profiling
      • Kernel Analysis
      • Server
      • Shell Script
      • System Programming
    • Language
      • Carbon
      • C,C++
      • C#
      • Java
      • Python
    • ETC
      • Data Struct | Algorithm
      • git
      • Security
    • Book
    • 경제공부
      • 세금
      • 부동산
hELLO · Designed By 정상우.
Linuxias

Developer's Delight

ETC/git

git diff Tip

2017. 3. 9. 07:42
반응형

git 과 patch 툴 사용 팁이다.


git diff --no-prefix > patchfile # 패치파일 생성
cd path/to/top                     # 패치하고자 하는 소스 위치
patch -p0 < patchfile            # 패치 적용

--no-prefix 옵션 없이 패치파일 생성한 경우 -p1 옵션으로 패치 적용 (패치내용의 a/ b/ path prefix 무시)

git diff > patchfile                 # 패치파일 생성
cd path/to/top                     # 패치하고자 하는 소스 위치
patch -p1 < patchfile            # 패치 적용



출처: http://jang574.tistory.com/entry/git-diff-한-것을-patch하기 [오모씨의 노트]

반응형
저작자표시 (새창열림)

'ETC > git' 카테고리의 다른 글

Linux terminal cmd line에 branch name 넣기  (0) 2017.08.04
Git Tip  (0) 2017.05.01
git 그래픽 연습 사이트  (0) 2016.02.03
git 사용 모음표  (0) 2013.06.19
git 사용  (0) 2013.06.13
    'ETC/git' 카테고리의 다른 글
    • Linux terminal cmd line에 branch name 넣기
    • Git Tip
    • git 그래픽 연습 사이트
    • git 사용 모음표
    Linuxias
    Linuxias
    I want to be a S/W developer who benefits people.

    티스토리툴바