3. VCS
1 of the three major affairs for
modern software development!
Version Control
Test
Automation
4. Distributed
Git is different from
centerization VCS, e.g.SVN,CVS.
svn checkout repos
git clone repos
svn commit
git commit && git push
svn update
git pull
5. Safety for Repos
We have local repositories, so
commit has no effect for others.
John : svn commit (include BUGS!)
Mike : svn update (with bugs, no notices)
Git is very affable to chickens :)
John : git commit (include BUGS)
Mike : git pull (from safe repos)
John : I fix bugs! :)
John : git push
6. Nice small commit
Each change has independent
meaning, should be separated.
John : edit a.txt b.txt c.txt d.txt ...
John : svn commit (all files)
Mike : edit a.txt b.txt c.txt d.txt ...
Mike : git add a.txt
Mike : git commit (only a.txt)
Mike : git add b.txt c.txt ...
Mike : git commit (b.txt, c.txt)
7. Very small commit
Git can make more smaller commit.
In 1 file’s changes.
Mike : edit a.txt
Mike : git add -p
... demo ...
Git has wonderful flexibility for
commits. Besides, we edit past
commits freely too.
8. Git repos world
Git has 5 areas for tracking.
- local -
untrack --------------------------------------
track --------------------------------------
modified --------------------------------------
index --------------------------------------
- remote -
remote --------------------------------------
Index is also called “Stage” or “Cache”.
9. FYI, if SVN...
SVN has no index.
- local -
untrack --------------------------------------
track --------------------------------------
modified --------------------------------------
- remote -
remote --------------------------------------
10. Flexibility by Index
untrack ----------------------------------------
track ----------------------------------------
modified ----------------------------------------
index ----------------------------------------
remote ----------------------------------------
15. Branches
Git branches are also useful.
Internal structure of git repos
master -----------------------------------
branch1 -----------------------------------
branch2 -----------------------------------
... -----------------------------------
branches form a commits tree.
16. SetucoCMS tree
Git repos branches:
master
- main workspace
has always newest commit
issXXX
- topic branch
for development, bugfix, for master
X.X
- release branch, has bug fix tags
18. Tree example
branches
master -*------*--------*------- *:commit
/ /
iss123 *--* /
/
1.0 *------ ---- ---
1.0.1 1.0.2 :tag
/
iss124 *--*--*
iss125 *----
Each branch has own history, and we
can merge them, delete, add, get,
push or pull at any time.
19. Repeal of stage
I decided to do away with Stage
branch.
Stage branch’s advantages
- careful confirmation
- modify safely
Disadvantages
- long about work
- possibillity of mistake
- difficult to leaning git
20. Setuco without stage
Let’s read wiki...
How to drive our git repos
http://bit.ly/setuco_drivegit
How to release SetucoCMS
http://bit.ly/setuco_release