개발모음집

빈 디렉토리 git으로 관리하는 방법 본문

DevOps

빈 디렉토리 git으로 관리하는 방법

void 2020. 9. 7. 10:00
$ mkdir tmp
$ touch tmp/.gitignore
$ git add tmp
$ echo '*' > tmp/.gitignore
$ git commit -m 'Empty directory' tmp

출처: https://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository

 

How can I add an empty directory to a Git repository?

How can I add an empty directory (that contains no files) to a Git repository?

stackoverflow.com

 

그리고 .gitgignore 파일에

tmp 추가

'DevOps' 카테고리의 다른 글

gcp ubuntu docker install, start  (0) 2021.02.08
git 강제 pull 받은거 복구하는 법  (0) 2020.06.18
git pull conflict일 때 해결방법  (0) 2020.05.07
git local branch 덮어쓰기  (0) 2020.03.30