본문 바로가기
AWS, Infra/Gitlab

[git, gitlab] .gitignore로 확장자 없는 파일을 무시하는 법 (gitignore)

by RoJae 2021. 12. 15.

🚀  들어가며...

  • 컴파일된 실행파일의 경우 확장자가 없습니다.
  • .gitignore에서 확장자 없는 파일을 무시하는 방법입니다.

 

💌 소스코드 (.gitignore)

# Ignore all
*

# Unignore all with extensions
!*.*

# Unignore all dirs
!*/

 

🔗  참고한 글

 

gitignore binary files that have no extension

How can binary files be ignored in git using the .gitignore file? Example: $ g++ hello.c -o hello The "hello" file is a binary file. Can git ignore this file ?

stackoverflow.com

 

 

댓글