touch README.md : 새로운 파일 "생성하기"
git status로 상태 확인
git add [파일명 혹은 .(전체)]로 추적할 파일 추가
echo 'main' >> README.md : 기존 파일 "수정 하기"
cat README.md : 파일의 내용 확인
git status로 상태 확인
git add [파일명 혹은 .(전체)]로 수정된 내용 추가
touch hello-world.sh : 파일 생성
echo "echo 'Hello, World!'" > hello-world.sh : hello-world.sh파일 안에 echo 'Hello, World!' 추가
cat hello-world.sh 파일 내용 확인
./hello-world.sh : 실행이 되지 않는다 = Permission Denied 실행 권한이 없는것
chmod 700 ./hello-world.sh : 실행 권한 부여
./hello-world.sh으로 실행
touch .gitignore : .gitignore 파일 생성
echo '**/hello-world.sh' >> .gitignore : .gitignore 파일에 **/hello-world.sh 내용 추가 git이 더 이상 해당 파일은 추적하지 않는다.
**와 *의 차이?
* (한 개) → 한 디렉토리의 모든 파일/폴더 매칭
** (두 개) → 여러 디렉토리까지 포함하여 매칭
echo '**/[폴더이름]' >> .gitignore : .gitignore 파일에 **/[폴더이름] 내용 추가 git이 더 이상 해당 폴더는 추적하지 않는다.