SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Version Control System
         Git
       Andrew Liu
What Is Version Control?
Manage data by systematically
keeping previous version
Used in word processing, wiki system,
software development
Popular solutions:
  CVS
  Subversion (SVN)
  Git
Why Use Version Control?
To collaborate with others
Orderly vs. chaotic
To keep track of history
Easy to debug
Easy to rollback
Why Git?
http://whygitisbetterthanx.com
Terminology
Repository
 The repository is where files' current and
 historical data are stored
Commit
 A commit is the action of writing or
 merging the changes made in the
 working copy back to the repository.
 The terms commit can also used in noun
 form to describe the new revision that is
 created as a result of committing.
Terminology
Branch
 A set of files under version control may
 be branched or forked at a point in time
 so that, from that time forward, two
 copies of those files may develop at
 different speeds or in different ways
 independently of each other.
Terminology
Conflict
  A conflict occurs when different parties
  make changes to the same document,
  and the system is unable to reconcile the
  changes. A user must resolve the conflict
  by combining the changes, or by
  selecting one change in favor of the
  other.
Terminology
Merge
 A merge is an operation in which two sets
 of changes are applied to a file or set of
 files.
Tag
 A tag refers to an important snapshot in
 time.
Head
 The most recent commit.
branches




commit      merge
ABOUT GIT
Cheat Sheet                           Create                                              Change                                                                Update

                From existing data                                             Using your favorite editor / IDE                    Fetch latest changes from origin
                cd ~/my_project_dir                                                                                                git fetch
                git init                                                                                                                                                    this does not merge them
                git add .                                                                                                          Pull latest changes from origin
                From existing repo                                                         Revert                                  git pull
                git clone ~/existing/repo ~/new/repo                                                                                                               does a fetch followed by a merge
                git clone you@host.org:dir/project.git                                                                             Apply a patch that someone sent you
                                                                  Return to the last committed state
                                        default protocol is ssh   git checkout -f | git reset --hard                               git am -3 patch.mbox
                                                                                             you cannot undo a hard reset                                 In case of conflict, resolve the conflict and
                                                                  Revert the last commit                                           git am --resolve
                                      Browse                      git revert HEAD
                                                                                                     Creates a new commit
                                                                  Revert specific commit
                Files changed in working directory
                                                                  git revert $id                                                                                Commit
                git status
                                                                                                     Creates a new commit
                Changes to tracked files
                                                                  Fix the last commit
                git diff                                                                                                            Commit all local changes
                                                                  git commit -a --amend
                Changes between ID1 and ID2                                                                                         git commit -a
                                                                                              after editing the broken files
                git diff <ID1> <ID2>
                                                                  Checkout the ID version of a file
                History of changes
                                                                  git checkout <ID> <file>
                git log
                Who changed what and when in a file
                git blame <file>                                                                                                                                Publish
                A commit identified by ID                                                 Branch
                git show <ID>                                                                                                       Prepare a patch for other developers
                A specific file from a specific ID                                                                                  git format-patch origin
                                                                  List all branches                                                 Push changes to origin
                git diff <ID>:<FILE>
                                                                  git branch                                                        git push [origin] [branch]
                Search for patterns
                                                                  Switch to the BRANCH branch                                       Make a version or milestone
                git grep <pattern> [path]
                                                                  git checkout <BRANCH>                                             git tag <version_name>
                                                                  Merge branch B1 into branch B2
                                                                  git checkout <B2>
                                                                  git merge <B1>
                                     Useful tips                  Create branch based on HEAD
                                                                  git branch <BRANCH>
                                                                  Create branch based on another
                Get help
                                                                  git checkout <new> <base>                                                                 Configuration
                git help [command]
                                                                  Delete a branch
                Create empty branch
                                                                  git branch -d <branch>                                           git config [--global]
                git symbolic-ref HEAD
                refs/heads/newbranch                                                                                                                                   global is stored in ~/.gitconfig
                rm .git/index                                                                                                      user
                git clean -fdx                                                   Resolve merge conflicts                           user.name $name
                <do work>                                                                                                          user.email $email
                git add your files                                View merge conflicts                                             color
                git commit -m 'Initial commit'                    git diff                                                         color.ui auto
                Graphical log                                     View merge conflicts against base file                           github
                git log --graph                                   git diff --base <FILE>                                           github.user $user
                git log --graph --pretty=oneline --                                                                                github.token $token
                                                                  View merge conflicts against other changes
                abbrev-commit                                     git diff --theirs <FILE>                                         optimisation
                Push branch to remote                                                                                              pack.threads 0
                                                                  View merge conflicts against your changes
                git push <origin> <branch>                        git diff --ours <FILE>                                           diff.renamelimit 0
                Delete remote branch and locally                  After resolving conflicts, merge with                                                                 do not use on low memory p
                git push <origin> :<branch>                       git add <CONFLICTING_FILE>                                       windows
                git branch -d <branch>                            git rebase --continue                                            core.autocrlf true


              http://github.com/AlexZeitler/gitcheatsheet                                           This work is licensed under a Creative Commons Attribution‐Share Alike 3.0 Unported License
Install Git
Windows
  http://help.github.com/win-set-up-git/
Mac
  http://help.github.com/mac-set-up-git/
Linux
  http://help.github.com/linux-set-up-git/
Get started
Clone a repository
 git clone <git‐repository>
Check current branch
 git branch
Showing current status
 git status
clean
                            • editing the files
git commit                  • new files




     staged             dirty

              git add
Clean to Dirty
Editing files
Creating new files
Deleting files
  Use git to remove a file
    git rm
    git mv
Files to ignore
  Account/password, log … etc
  .gitignore
Dirty to staged
Add particular changed file or new file
  git add <filename>
Add all changed or new files
  git add .
Add interactively
  git add –i
Pick particular changes
  git add ‐p
Staged to clean
Commit a version and open a text
editor for commit message
 git commit
Specify commit message
 git commit –m “<message>”
Commit all changes
 git commit ‐a
clean
git revert HEAD                           git checkout <filename>




          staged                    dirty

                  git rm –cached <filename>
Dirty to Clean
Remove the changes
  Note: this is not revertible
  git checkout <filename>
Reset all if messed up
  git reset ‐‐hard HARD
Staged to Dirty
Removing files from the staged status
  git rm –cached <filename>
Clean to Staged
Create new commit for reverting
 git revert HEAD
Naming Commits
Hashed by SHA-1
 e05db0fd4f31dde7005f075a84f96b360d05984
 b
 e05db0fd
Branch name
Tag name
HEAD
 HEAD
 HEAD^
 HEAD^^
 HEAD~4
TRACKING HISTORY
Log
Showing all logs:
  git log
Commits since a version:
  git log <version>..
Commits from a version to another:
  git log <version‐a>..<version‐b>
Commits to a certain file
  git log <filename>
Diff and Show
Difference between HEAD and HEAD^
  git diff
Difference between HEAD and staged file
  git diff ‐‐cached
Difference between versions
  git diff <version‐a>..<version‐b>
Showing most current commit
  git show
Show a file at a certain version
  git show <version>:<filename>
Tags
Creating tags
  git tag <tag‐name> <version>
Get a list of tags
  git tag –l
Bisect
Find by binary search the change that
introduced a bug
 git bisect start
 git bisect good <good‐version>
 git bisect bad <bad‐version>
HEAD is now point to the commit
which is reachable from <bad-version>
but not from <good-versoin>
Bisect
If it does crash, then:
  git bisect bad
If it is working, then:
  git bisect good
Finally find the guilty commit:
  git bisect reset
BRANCH AND MERGE
A Clean Tree
Some operations must be applied on a
clean tree (i.e. no dirty or staged file)
Git provides a stack for unclean files
  git stash
  git stash pop
More on Branches
Switching to another branch
  Note: the tree should be clean
  git checkout <branch>
Create a new branch
  git branch <new‐branch>
  git branch <new‐branch> <start‐point>
Create and switch to the new branch
  git checkout –b <new‐branch>
  git checkout –b <new‐branch> <start‐
  point>
D       E

                                    Possible Conflict
Original   A   B       C


                   D       E


Merge      A   B       C       F



                   D       E


Rebase     A   B       C       D’   F’
Merge
Merge the current branch with
<another-branch>
  git merge <another‐branch>
Conflicts may occurred if modifications
of a same file are in both branches
Helpers
Showing common ancestor
 git show :1:<filename>
Showing the version of HEAD
 git show :2:<filename>
Showing the version of MERGE_HEAD
 git show :3:<filename>
Give up a merge
 git reset ‐‐hard HEAD
Rebase
Start rebase procedure
  git rebase <another‐branch>
Rebase would stop if conflicts
occurred
  To continue the rebase process:
  git rebase ‐‐continue
Stop the rebase procedure
  git rebase ‐‐abort
Resolve Conflicts
1. Use git diff to find out the
   conflicted files
2. Resolve the conflict by your favorite
   editor
3. git add <resolved‐file>
4. git commit (not needed for rebase)
WORKING WITH OTHERS
Setup remote
Listing all remotes
  git remote
Adding new remote
  git remote add <git‐path> <remote>
git clone will automatically setup
remote “origin”
Working with remote
Get information from remote
  git fetch
Pulling a branch
  git pull <remote> <branch>
  git pull <remote> <local>:<target>
git pull <remote> <branch> is equal to:
  git fetch
  git merge <remote>/<branch>
Pushing to remote
The push command
 git push <remote> <branch>
 git push <remote> <local>:<target>
Push command may fail if conflicts
occurred on remote
To solve the problem:
Pull down and merge then push
LET’S DOWN TO EARTH
Get a Repository
Set a server
  Possible, but it requires lots of efforts
Use provided service
  Github: http://github.com/
    The most popular solution
    Free for public projects
  Codaset: http://codaset.com/
    Provides a single free private project for each
    account
Github for example
Creating Project
Setup a Repository
Follow instructions:
BEST PRACTICES
Tips
Each commit includes a single logical
change
The code should be tested before
commit
 (NOT RECOMMEND) Mark “untested” if
 the commit is not tested
Rebase rather than merge when
dealing with local branches
For Web Application
           Development
Two branches:
 master
   Mapped to the production site
 dev
   Mapped to the test site
Workflow
 Develop in dev or other branches except
 master
 Push to dev for testing
 Push to master for production

Contenu connexe

Tendances

Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control SystemKMS Technology
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control SystemMohammad Imam Hossain
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
Version control system
Version control systemVersion control system
Version control systemAryman Gautam
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 

Tendances (20)

Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git
GitGit
Git
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
git and github
git and githubgit and github
git and github
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Learning git
Learning gitLearning git
Learning git
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Version control system
Version control systemVersion control system
Version control system
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 

Similaire à Version control system

git-cheat-sheet
git-cheat-sheetgit-cheat-sheet
git-cheat-sheetbrecke
 
git-cheat-sheet
git-cheat-sheetgit-cheat-sheet
git-cheat-sheetbrecke
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubDSC GVP
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubalidor4702
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheetLam Hoang
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGandhi Ramu
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践Terry Wang
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?9 series
 

Similaire à Version control system (20)

Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Session git
Session gitSession git
Session git
 
git-cheat-sheet
git-cheat-sheetgit-cheat-sheet
git-cheat-sheet
 
git-cheat-sheet
git-cheat-sheetgit-cheat-sheet
git-cheat-sheet
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Linux GIT commands
Linux GIT commandsLinux GIT commands
Linux GIT commands
 
github_gyan.pptx
github_gyan.pptxgithub_gyan.pptx
github_gyan.pptx
 
Git basic
Git basicGit basic
Git basic
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and github
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
 
GDSC - Introduction to GIT
GDSC - Introduction to GITGDSC - Introduction to GIT
GDSC - Introduction to GIT
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 

Version control system

  • 1. Version Control System Git Andrew Liu
  • 2. What Is Version Control? Manage data by systematically keeping previous version Used in word processing, wiki system, software development Popular solutions: CVS Subversion (SVN) Git
  • 3. Why Use Version Control? To collaborate with others Orderly vs. chaotic To keep track of history Easy to debug Easy to rollback
  • 5. Terminology Repository The repository is where files' current and historical data are stored Commit A commit is the action of writing or merging the changes made in the working copy back to the repository. The terms commit can also used in noun form to describe the new revision that is created as a result of committing.
  • 6. Terminology Branch A set of files under version control may be branched or forked at a point in time so that, from that time forward, two copies of those files may develop at different speeds or in different ways independently of each other.
  • 7. Terminology Conflict A conflict occurs when different parties make changes to the same document, and the system is unable to reconcile the changes. A user must resolve the conflict by combining the changes, or by selecting one change in favor of the other.
  • 8. Terminology Merge A merge is an operation in which two sets of changes are applied to a file or set of files. Tag A tag refers to an important snapshot in time. Head The most recent commit.
  • 11. Cheat Sheet Create Change Update From existing data Using your favorite editor / IDE Fetch latest changes from origin cd ~/my_project_dir git fetch git init this does not merge them git add . Pull latest changes from origin From existing repo Revert git pull git clone ~/existing/repo ~/new/repo does a fetch followed by a merge git clone you@host.org:dir/project.git Apply a patch that someone sent you Return to the last committed state default protocol is ssh git checkout -f | git reset --hard git am -3 patch.mbox you cannot undo a hard reset In case of conflict, resolve the conflict and Revert the last commit git am --resolve Browse git revert HEAD Creates a new commit Revert specific commit Files changed in working directory git revert $id Commit git status Creates a new commit Changes to tracked files Fix the last commit git diff Commit all local changes git commit -a --amend Changes between ID1 and ID2 git commit -a after editing the broken files git diff <ID1> <ID2> Checkout the ID version of a file History of changes git checkout <ID> <file> git log Who changed what and when in a file git blame <file> Publish A commit identified by ID Branch git show <ID> Prepare a patch for other developers A specific file from a specific ID git format-patch origin List all branches Push changes to origin git diff <ID>:<FILE> git branch git push [origin] [branch] Search for patterns Switch to the BRANCH branch Make a version or milestone git grep <pattern> [path] git checkout <BRANCH> git tag <version_name> Merge branch B1 into branch B2 git checkout <B2> git merge <B1> Useful tips Create branch based on HEAD git branch <BRANCH> Create branch based on another Get help git checkout <new> <base> Configuration git help [command] Delete a branch Create empty branch git branch -d <branch> git config [--global] git symbolic-ref HEAD refs/heads/newbranch global is stored in ~/.gitconfig rm .git/index user git clean -fdx Resolve merge conflicts user.name $name <do work> user.email $email git add your files View merge conflicts color git commit -m 'Initial commit' git diff color.ui auto Graphical log View merge conflicts against base file github git log --graph git diff --base <FILE> github.user $user git log --graph --pretty=oneline -- github.token $token View merge conflicts against other changes abbrev-commit git diff --theirs <FILE> optimisation Push branch to remote pack.threads 0 View merge conflicts against your changes git push <origin> <branch> git diff --ours <FILE> diff.renamelimit 0 Delete remote branch and locally After resolving conflicts, merge with do not use on low memory p git push <origin> :<branch> git add <CONFLICTING_FILE> windows git branch -d <branch> git rebase --continue core.autocrlf true http://github.com/AlexZeitler/gitcheatsheet This work is licensed under a Creative Commons Attribution‐Share Alike 3.0 Unported License
  • 12. Install Git Windows http://help.github.com/win-set-up-git/ Mac http://help.github.com/mac-set-up-git/ Linux http://help.github.com/linux-set-up-git/
  • 13. Get started Clone a repository git clone <git‐repository> Check current branch git branch Showing current status git status
  • 14. clean • editing the files git commit • new files staged dirty git add
  • 15. Clean to Dirty Editing files Creating new files Deleting files Use git to remove a file git rm git mv Files to ignore Account/password, log … etc .gitignore
  • 16. Dirty to staged Add particular changed file or new file git add <filename> Add all changed or new files git add . Add interactively git add –i Pick particular changes git add ‐p
  • 17. Staged to clean Commit a version and open a text editor for commit message git commit Specify commit message git commit –m “<message>” Commit all changes git commit ‐a
  • 18. clean git revert HEAD git checkout <filename> staged dirty git rm –cached <filename>
  • 19. Dirty to Clean Remove the changes Note: this is not revertible git checkout <filename> Reset all if messed up git reset ‐‐hard HARD
  • 20. Staged to Dirty Removing files from the staged status git rm –cached <filename>
  • 21. Clean to Staged Create new commit for reverting git revert HEAD
  • 22. Naming Commits Hashed by SHA-1 e05db0fd4f31dde7005f075a84f96b360d05984 b e05db0fd Branch name Tag name HEAD HEAD HEAD^ HEAD^^ HEAD~4
  • 24. Log Showing all logs: git log Commits since a version: git log <version>.. Commits from a version to another: git log <version‐a>..<version‐b> Commits to a certain file git log <filename>
  • 25. Diff and Show Difference between HEAD and HEAD^ git diff Difference between HEAD and staged file git diff ‐‐cached Difference between versions git diff <version‐a>..<version‐b> Showing most current commit git show Show a file at a certain version git show <version>:<filename>
  • 26. Tags Creating tags git tag <tag‐name> <version> Get a list of tags git tag –l
  • 27. Bisect Find by binary search the change that introduced a bug git bisect start git bisect good <good‐version> git bisect bad <bad‐version> HEAD is now point to the commit which is reachable from <bad-version> but not from <good-versoin>
  • 28. Bisect If it does crash, then: git bisect bad If it is working, then: git bisect good Finally find the guilty commit: git bisect reset
  • 30. A Clean Tree Some operations must be applied on a clean tree (i.e. no dirty or staged file) Git provides a stack for unclean files git stash git stash pop
  • 31. More on Branches Switching to another branch Note: the tree should be clean git checkout <branch> Create a new branch git branch <new‐branch> git branch <new‐branch> <start‐point> Create and switch to the new branch git checkout –b <new‐branch> git checkout –b <new‐branch> <start‐ point>
  • 32. D E Possible Conflict Original A B C D E Merge A B C F D E Rebase A B C D’ F’
  • 33. Merge Merge the current branch with <another-branch> git merge <another‐branch> Conflicts may occurred if modifications of a same file are in both branches
  • 34. Helpers Showing common ancestor git show :1:<filename> Showing the version of HEAD git show :2:<filename> Showing the version of MERGE_HEAD git show :3:<filename> Give up a merge git reset ‐‐hard HEAD
  • 35. Rebase Start rebase procedure git rebase <another‐branch> Rebase would stop if conflicts occurred To continue the rebase process: git rebase ‐‐continue Stop the rebase procedure git rebase ‐‐abort
  • 36. Resolve Conflicts 1. Use git diff to find out the conflicted files 2. Resolve the conflict by your favorite editor 3. git add <resolved‐file> 4. git commit (not needed for rebase)
  • 38. Setup remote Listing all remotes git remote Adding new remote git remote add <git‐path> <remote> git clone will automatically setup remote “origin”
  • 39. Working with remote Get information from remote git fetch Pulling a branch git pull <remote> <branch> git pull <remote> <local>:<target> git pull <remote> <branch> is equal to: git fetch git merge <remote>/<branch>
  • 40. Pushing to remote The push command git push <remote> <branch> git push <remote> <local>:<target> Push command may fail if conflicts occurred on remote To solve the problem: Pull down and merge then push
  • 42. Get a Repository Set a server Possible, but it requires lots of efforts Use provided service Github: http://github.com/ The most popular solution Free for public projects Codaset: http://codaset.com/ Provides a single free private project for each account
  • 45. Setup a Repository Follow instructions:
  • 47. Tips Each commit includes a single logical change The code should be tested before commit (NOT RECOMMEND) Mark “untested” if the commit is not tested Rebase rather than merge when dealing with local branches
  • 48. For Web Application Development Two branches: master Mapped to the production site dev Mapped to the test site Workflow Develop in dev or other branches except master Push to dev for testing Push to master for production