forked from mingrammer/git-tips
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
thomas edited this page Feb 28, 2018
·
3 revisions
git config --list
git init git clone <url>
git status
git add <filename>
git status -s
git diff git diff --staged git diff --cached
git commit git commit -m "커밋내용" git commit -a -m "파일추가하면서 커닛하기"
git rm <filename>
git mv <file_from> <file_to>
git log git log -2 ;최근 2개 git log -2 -p ;diff내용포함 git log --stat ;각 커밋의 통계정보 git log --pretty=format:"%h %s" --graph git log --oneline --decorate --graph --all git log --since=2.weeks git log --S<pattern>
git commit --amend
git remote git remote -v git remote add <short_name> <url> ;리모트 저장소 추가. git remote rename <org> <new> ;리모트 저장소 이름 변경 git remote rm <name> ;리모트 저장소 삭제 git remote show origin ;원격저장소 살펴보기 git push origin master ;리모트 저장소에 Push
git tag git tag -l '패턴'
git branch <branch_name> ;브랜치 생성 git checkout <branch_name> ;해당 브랜치로 이동 git checkout -b iss53 ;브랜치생성+체크아웃 git checkout -b hotfix git commit -a -m '오류 수정 후 커밋' git checkuot master ;master로 이동 후 git merge hotfix ;hotfix 브랜치를 머지한다. git branch -d hotfix ;hotfix 브랜치를 삭제한다. git branch -v ;브랜치마다 마지막 커밋 메세지를 보여준다. git branch --merged ;이미 branch한 목록을 확인한다. git branch --no-merged ;현재 checkout 한 브랜치에 merge하지 않은 브랜치를 확인한다.
git gui ;on Windows