[git] gitignore 로 확장자 없는 실행파일 커밋 무시하기
2021. 3. 1. 11:23ㆍgit
stackoverflow.com/questions/5711120/gitignore-binary-files-that-have-no-extension
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
cpp로 알고리즘을 풀고 실행을 하면 확장자가 없는 binary file이 생긴다. 예를 들면 example.cpp이라는 파일을 컴파일하여 실행했을 때 example이라는 파일이 생긴다. 이 파일을 무시하고 example.cpp만 커밋하기 위해서 .gitignore을 작성해주어야 한다.
요런 식으로 추가해주면 된다고 한다!