Рет қаралды 342,047
Introduction to Git - Core Concepts.
Twitter: @davidmahler
LinkedIn: / davidmahler
References:
Pro Git by Scott Chacon - git-scm.com/bo...
Visual Git Reference by Mark Lodato - marklodato.git...
Commands used in this video:
git init - initialize a new repo in a directory
git config --global user.name "name"
git config --global user.email "email"
(--local option as well)
git status - see the state of files in working tree, staging area vs latest commit in git history
git add - move file(s) to the staging area
git log - view the git history / git commit graph
git diff - diff of working tree and staging area
git diff --cached - diff of staging area and latest commit
git rm - remove a file from the working tree and the staging area
git checkout -- filename - retrieve a file from the staging area into the working tree
git reset HEAD filename - retrieve a file from the latest commit into the staging area
git checkout (commit hash) filename - retrieve a file from a previous commit