Git: Giting the BasicGerald VillorenteKite Systems Inc.Drupal.IT / 06-01-2013 / Microsoft PH Makati City
Kite Systems Git me
What is Git?Git (/ t/) is a distributed revision control andɡɪsource code management (SCM) system withan emphasis on speed. Initially designed anddeveloped by Linus Torvalds for Linux kerneldevelopment, Git has since been adopted bymany other projects.http://en.wikipedia.org/wiki/Git_(software)
Why Git?● Distributed (upstream/downstream)● Git has integrity (SHA-1)● Local and remote revisioning● Full history● Push/pull only requires internet● Fast● Its awesome!
Branching● git checkout -b bayabasSwitching branch● git checkout okra● git branch -d alugbatiNOTE: a branch is not available to others unless youpush the branch to your remote repository● git push origin talong
Update and Merge● git pull- Fetch from and merge with another repository or a local branch● git pull origin● git pull origin <branch_name> or git pull –all● git fetch origin- Download objects and refs from another repository● git diff <source_branch> <target_branch>● git merge <branch_name>● git merge <branch_name> -m “Message”
Conflict during Merge● Use diff tool or “git diff” command● git add <filename>
Git Useful Commands● git status- Show the working tree status● git log- Show commit logs● git show- Show various types of objects● git fetch- Download objects and refs from another repository● git log --oneline