Git&GitHub 를 이용한 버전관리와 협업 - 2.비교하기와 되돌리기
-
Upload
youngbin-han -
Category
Software
-
view
167 -
download
11
Transcript of Git&GitHub 를 이용한 버전관리와 협업 - 2.비교하기와 되돌리기
git diff
• git diff [--options] [--] [<path>…]
git diff --cached
• git diff [--options] --cached [<commit>] [--] [<path>…]
git diff <commit>
• git diff [--options] <commit> [--] [<path>…]
git diff <commit1> <commit2>
• git diff [--options] <commit1> <commit2> [--] [<path>…]
• --word-diff
[-…-], {+…+}
• --word-diff=color
• --color-words
--word-diff=color
git log -p
git commit --amend
• git add more-file
• git commit --amend -m “edited commit”
git checkout• git checkout master
• git checkout <commit>
<commit>
• git checkout <commit> <file>
<file> <commit>
git checkout hello.c aj78su7
git reset • git reset <file>
• git reset
• git reset <commit>
• git reset ORIG_HEAD
--hard
git reset d2h8ffs
git reset --hard• git reset --hard
• git reset --hard <commit>
• git reset --hard ORIG_HEAD
--hard
git revert
• git revert <commit>
git revert aj78su7
Added OS Version Check + if(OS.getVersion()<7.0){ + System.out.println(“Your OS is too Old!”); + }
Revert “Added OS Version Check” - if(OS.getVersion()<7.0){ - System.out.println(“Your OS is too Old!”); - }