git 공식문서를 참고하여 작성하였습니다.
git add [파일이름]: 해당 파일을 git이 관리(tracking)
git commit -m "": git이 tracking하는 파일의 현재상태를 로컬 데이터베이스에 저장
git push [remote 이름][branch 이름]: 해당 branch의 상태를 remote(원격저장소)에 push하여 저장(반영)
remote: 원격저장소
어떤 이벤트가 생겼을 때 자동으로 특정 스크립트를 실행할 수 있도록 하는 명령어
client hook: commit / merge
server hook: push (서버에서 실행됨)
.git/hooks에 저장됨 (default)
commit할 때 가장 먼저 호출되는 hook, 커밋 작성 전 호출됨
커밋하는 snapshot(add를 통해 tracking한 파일들의 현 상태)을 점검
커밋할 때 꼭 확인해야할 것이 있으면 해당 명령어로 확인할 수 있음
if exit code != 0: 커밋 취소됨
remote로 데이터를 전송하기 전에 호출됨
push 하기 전에 커밋이 유효한지 확인하는 용도로 사용할 수 있음
commit, branch, information of files... 모두 해당 폴더에서 관리함
리눅스 매뉴얼 페이지를 참고하여 작성하였습니다. 해당 매뉴얼은 리눅스에서 man command로 확인할 수 있습니다.
list dirctory contents
print name of current/working directory
change the working directory
cd [이동하고자 하는 위치로의 상대, 절대 경로]
excute a command as another user
oriented (visual) display editor
advenced text editor, vi보다 향상된 버전
참고: vim.org
GNU Bourne-Again Shell
standard input이나 file에서 command를 읽고 실행하는 command language interpreter
bash [options][command_string | file]
scripting language and also shell designed for interactive use
bash보다 더 많은 기능을 지원함
change the user's login shell (current)
새 콘솔/터미널을 열때 실행, 로그인 없이 bash가 실행될 때 로드됨 (로그인에만 국한되는 것이 아님)
마찬가지로 새 콘솔을 열때 실행, 로그인 없이 zsh가 실행될 때 로드됨
bash 명령어인 .와 동의어 (. filename)
filename에서 command를 읽고 실행함
환경설정파일을 수정한 후에 수정된 값을 바로 적용하기 위해 사용 -> 특정 환경설정파일은 유저가 로그인할 때 읽는 파일이기 때문
ex) source /etc/bashrc
계정 디렉토리에 존재하는 파일.
bash 외의 shell로 로그인했을 때 로딩됨.
환경변수를 세팅할 때 사용
change file mode / permissions
change file owner and group
make links between files