A brief history of Version control :
1) First Generation
-> Single-file
-> No networking
-> e.g.SCCS, RCS
2) Second Generation
-> Multi-file
-> Centralized
-> e.g. CVS, VSS,SVN,TFS, Perforce.
3) Third Generation - Which are the distributed version control like GIT, Mercurial, Bizaar, and
BitKeeper.
-> These works on Changesets.
-> These changes sets can be shift around and both clients and servers can
have the entire repository present which allows us to do some
interesting things.
Version control revolution :
Single File to Multi-File - change sets. - and going from no networking such as centralized to a distributed and all the additional capabilities that added with these new generations,.
Advantages of DVCS ( Distributed Version Control Systems)
1) Different topologies.
a) Centralized - Developers push changes to one central repository.
b) Hierarchical - Developers push changes to subsystem-based repositories.
Sub-system repositories are peroidically merged into a main repository.
c) Distributed - Developers push changes to their own repository.
Project maintainers pull changes into the official repository.
2) Backups are easy
3) Reliable branching/merging
-> Feature branches.
-> Always work under version control
-> Applying fixes to different branches.
4) Full local history
-> Compute repository statistics.
-> Analyze regressions.
5) New ideas
-> Deployment
.. git push heroku prod_branch
GIT
-> Created by Linux Torvalds, who also created Linux.
-> Prompted by Linux-BitKeeper ( It's a commercial DVCS that was used by the Linux Kernel team
from 2002 to 2005 ) Separation
-> Written perl and C
-> Design goals
Speed
Simplicity
Strong branch/merge support
Distributed
Scales well for large projects.
Configuring Git
1) System-level configuration.
-> Git config --system
--> Stored in /etc/gitconfig or c:\Program Files(x86)\Git\etc\gitconfig
2) User-level configuration
-> git config --global
-> Stored in ~/.gitconfig or c:\users\<NAME>\.gitconfig
3) Repository-level configuration
->Git config.
-> Stored in .git/config in each repo
$ cat ~/.gitconfig
$ git config --global --list
$ git config --global user.name "Devendra Dev"
$ git config --global user.email " "
$ git config --global core.editor
$ git config --global help.autocorrect 1
- git branch develop
- git push -u origin develop
- git checkout develop
- git checkout - b feature_branch
- git flow feature start feature_branch
Very good link for reference - https://www.atlassian.com/git/tutorials/what-is-version-control
Gitflow Workflow
Gitflow- work flow - https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
A complete example demonstrating a Feature Branch Flow is as follows. Assuming we have a repo setup with a
master
branch.
No comments:
Post a Comment