[git]
working directory | staging area | .git diretory
git폴더에 cmder을 통해 명령어 입력
git 폴더에 a,b,c .txt파일 생성
echo hello world! > a.txt
echo hello world! > b.txt
echo hello world! > c.txt
파일의 상태 확인
git status
현재 working directory에 위치
staging area에 들어가기 (commit 할 준비하기)
git add a.txt
git add b.txt c.txt - 이렇게 작성해도 됨
git add *.txt - .txt로 작성한 모든 파일 옮기기
현재 staging area에 위치
a.txt파일에 song추가하기
echo song >> a.txt
동일한 파일이더라도 staging이 된 이후에 수정된 내용들은>>> unstaged files
git add a.txt 하면 다시 staging area로! 옮겨진다.
다시 working directory로 옮기기
git rm --cached *
모든 파일을 working directory로 옮기기
모든 파일을 포함해서 staging area에 추가
git add .
ls => 목록확인
dir => 목록확인(윈도우)
doskey ls = dir => dir를 ls로 바꿔줌(윈도우)
del => 파일 삭제(윈도우)