Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git #54

Open
skyfe79 opened this issue Aug 15, 2022 · 5 comments
Open

Git #54

skyfe79 opened this issue Aug 15, 2022 · 5 comments
Labels
::DRAFT 작성 중인 글 git git 관련 글 github Github 관련 글 tips 짧막한 팁

Comments

@skyfe79
Copy link
Owner

skyfe79 commented Aug 15, 2022

git 및 github 관련 팁을 모아보는 쓰레드 글입니다. 😊

@skyfe79 skyfe79 added tips 짧막한 팁 ::DRAFT 작성 중인 글 git git 관련 글 github Github 관련 글 labels Aug 15, 2022
@skyfe79
Copy link
Owner Author

skyfe79 commented Aug 15, 2022

특정 파일을 내 PC(로컬)에서만 ignore 하기

  • 특정 파일을 자신의 로컬에서만 ignore해야할 경우가 있습니다.
  • 협업 개발에서 package.lock 또는 Podfile.lock 등이 예가 될 수 있겠네요.
  • 이 경우, .git/info/exclude 에 파일 이름을 기록하면 됩니다.
  • 아니면 git update-index --assume-unchanged <file-list> 명령어를 사용해도 된다고 합니다.
  • 자세한 내용은 참고 링크를 확인해 주세요~

참고: https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally

@skyfe79
Copy link
Owner Author

skyfe79 commented Aug 16, 2022

특정 파일만 로컬에서 ignore 하기 설정 되돌리기.

  • git update-index --assume-unchanged <file-list> 명령어로 특정 파일을 트랙킹하지 않기로 설정한 후 다시 트랙킹이 필요할 때 아래 명령어로 되돌릴 수 있다.
  • git update-index --no-assume-unchanged <file>

참고: https://stackoverflow.com/questions/17195861/undo-git-update-index-assume-unchanged-file

@skyfe79
Copy link
Owner Author

skyfe79 commented Aug 16, 2022

현재 트랙킹을 하지 않는 파일 목록 확인하기

  • git ls-files -v|grep '^h'

@skyfe79
Copy link
Owner Author

skyfe79 commented May 26, 2023

특정 이름으로 시작하는 모든 브랜치 삭제하기

  • 아래 명령어에서 {{pattern}} 부분을 변경합니다.
git branch | grep {{pattern}} | xargs git branch -D
  • feature 시작하는 모든 브랜치 삭제.
  • git branch | grep feature | xargs git branch -D

@skyfe79
Copy link
Owner Author

skyfe79 commented Jul 17, 2023

Directory별 계정 설정하기

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
::DRAFT 작성 중인 글 git git 관련 글 github Github 관련 글 tips 짧막한 팁
Projects
None yet
Development

No branches or pull requests

1 participant