git: a representation
TRANSCRIPT
GITGITGet started to use GitGet started to use Git
Git Real VideoGit Real Video
GIT compares with GIT compares with SVNSVN
decentralization vs centeralizationdecentralization vs centeralization
revision systemrevision system
repository structurerepository structure
standard processstandard process
Create a new RepoCreate a new Repogit init:
File life cycleFile life cycle
UntrackedUntrackedGit doesn't know about these files
Tracked, unmodifedTracked, unmodifedGit knows about them, and there have beenno changes.
Tracked, modifiedTracked, modifiedFile is in git, but changes have been made that git doesn't know about.
StagedStagedChanges to this file will be committed next time you commit.
Staging & CommitStaging & Commitgit status, git add, git diff, git commitgit status, git add, git diff, git commit
UndoUndogit commit –amend, git resetgit commit –amend, git reset
You just learned…You just learned…...how to add new files to the ...how to add new files to the repository.repository.
...how to stage and commit new changes....how to stage and commit new changes.
...how to check the status of your ...how to check the status of your current changes.current changes.
...how to undo changes to files and amend ...how to undo changes to files and amend commits.commits.
Remotes 1Remotes 1
create a repo ( github )create a repo ( github )
cloning a repo ( github )cloning a repo ( github )
git remote add origin, git push –u origin master, git clonegit remote add origin, git push –u origin master, git clone
Remotes 2Remotes 2
pushpush
pull & pull & conflictconflict
You just learned…You just learned…
...how to create a new repository in ...how to create a new repository in github.github.
...how to clone remote repos and ...how to clone remote repos and push changes to them.push changes to them.
...how to deal with merge conflicts....how to deal with merge conflicts.
Branches Part IBranches Part I
What is branchesWhat is branchesA branch is really just a seperatedA branch is really just a seperatedversion of your code.version of your code.
E.g., A 'pretty' version of your paper,E.g., A 'pretty' version of your paper,vs. one you're overhauling.vs. one you're overhauling.
In technical terms, it is a pointer toIn technical terms, it is a pointer toa commita commit
commitcommit
Repo: revisitRepo: revisit
Branches Part 2Branches Part 2A branch is a pointer to a A branch is a pointer to a commitcommit
Branches Part 3Branches Part 3The files in our working directory The files in our working directory reflect HEADreflect HEAD
Branches Part 4Branches Part 4Two branches can point to the same Two branches can point to the same commitcommit
Branches Part 5Branches Part 5Move HEAD with Move HEAD with checkoutcheckout
Branches Part 6Branches Part 6New commits move the HEAD New commits move the HEAD branchbranch
Merge 1Merge 1A merge scenarioA merge scenario
Merge 2Merge 2Another merge scenarioAnother merge scenario
Using branches and Using branches and tagstags
You just learned…You just learned…
What tags and branches are.What tags and branches are.
How to make one.How to make one.
How to merge changes from one branch How to merge changes from one branch onto another branch.onto another branch.
Git FlowGit Flow
Branching StrategyBranching Strategy
Standard process: Standard process: http://nvie.com/posts/a-successful-git-branching-model/http://nvie.com/posts/a-successful-git-branching-model/
The software toolThe software toolSourceTree : http://www.sourcetreeapp.com/SourceTree : http://www.sourcetreeapp.com/
Master, Develop, Feature branchesMaster, Develop, Feature branches
Other advanced Other advanced featuresfeatures
http://pan.baidu.com/s/1mgiEKQ0http://pan.baidu.com/s/1mgiEKQ0
ResetReset
rebaserebase