본문 바로가기

Git

Git 특정 폴더 아래의 전체 파일 무시하기

반응형

 

1. vi를 이용하여 ignore 파일을 연다.

 vi .gitignore
 

2. 맨 아래쪽으로 가서 무시하고자 하는 폴더 위치를 아래 처럼 넣는다.

# Uploaded Static Files
static/uploaded/
 
  • 흰 배경회색 가로줄 배경어두운 배경
  •  
  • 삭제

3. gitstatus를 했지만 위의 특정 폴더 아래 변경사항은 안보이게 된다.

$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   .gitignore
	modified:   HelloWorld/__pycache__/urls.cpython-38.pyc
	modified:   HelloWorld/templates/HelloWorld/write.html
	modified:   SunnyBlog/__pycache__/settings.cpython-38.pyc
	modified:   SunnyBlog/settings.py
	modified:   db.sqlite3
	modified:   static/js/wysiwyg.js
 

 

 

반응형

'Git' 카테고리의 다른 글

Github에 잘 못 올라간 파일 삭제하기  (0) 2022.02.10
git 초기 설정  (0) 2022.02.08
github에 PC public key 연결하기.  (0) 2022.02.08
git 명령어 정리  (0) 2018.01.16