본문 바로가기

IT/ETC

Git

반응형

https://github.github.com/training-kit/downloads/github-git-cheat-sheet/

https://try.github.io/

Git branches are simply pointers pointing to a specific command. 

 

Branch early, and branch often.

 

rebase in git

 

HEAD - symbolic name for currently checked out commit. always points to the most recent commit. 

instead of checking out to a branch, you could check out towards specific commit. 

 

Caret(^) - travels to parent version

 

Tilde(~) - travles specific number of parents 

 

git branch -f master HEAD~3 = =        move master branch to head + 3

 

reversing changes in git::

git reset - works great in local repository, going back to rewrite history

 

git revert  - works great for remote repository, git revert creates a new commit of the previous version, allowing you to push to other checkouts. 

 

 

 

 

Above commands should cover 90% of vcs(version control system) while 10% will help in more flexible precise ways.

 

cherry-pick

 

git rebase -i HEAD~4, omit and pick 

use tag for version display 

 

반응형

'IT > ETC' 카테고리의 다른 글

IP 주소(3/11/2020)  (0) 2020.03.11
Checked vs Unchecked  (0) 2020.03.05
Design ToolBox  (0) 2020.02.29
Chapter 2  (0) 2020.02.28
Chapter 1  (0) 2020.02.27