git

#TIL git diff 문맥 파악에 도움을 주는 hunk-header

less than 1 minute read

git diff에서 변경된 줄을 나타내는 Hunk를 보여준다. @@ -418,6 +418,8 @@ 이런 식으로 라인 넘버를 같이 표시해 준다. 여기에 header를 출력해 변경 사항에 정보를 제공한다. 예를 들어 header에 포함된 함수나 클래스 선언을 보여줄 수 있다. 라인 넘...

#TIL #jenkins #git sparse checkout으로 사용 공간을 아껴쓰자

less than 1 minute read

빌드 머신 저장 공간이 가득 찰 일은 없겠지? 저장 공간 FULL이 나서 빌드 몇 번 실패해보면 정신을 차린다. 너무 헤프게 쓰고 있었구나. 게다가 mac mini라 저장 공간을 바로 늘릴 수도 없다. 필요한 것만 checkout 해서 쓰자. checkout 속도가 빨라져 빌드하는...

#TIL #git origin 리모트 저장소 변경

less than 1 minute read

$ cd existing_repo $ git remote rename origin old-origin $ git remote add origin new_repo_url $ git push -u origin --all $ git push -u origin --tags $ git re...

#TIL #git 이전 commit 쪼개기

1 minute read

Start an interactive rebase with git rebase -i <commit>^, where is the commit you want to split. In fact, any commit range will do, as long as...