Boost Fertility New Invention Ups Success Rates.pdf
Collaborative development using git, Session conducted at Model Engineering College, Ernakulam on 2013-09-26
1. No. 1September 27, 2013
Collaborative development with Git
Vimal Joseph
Technical Architect
2. No. 2September 27, 2013
Collaborative development with Git
Tracking Changes
User A
User B
D1
D1
Time
D1 D1.1 D1.2 D1.3
3. No. 3September 27, 2013
Collaborative development with Git
Tracking changes in a document with OpenOffice Writer
4. No. 4September 27, 2013
Collaborative development with Git
What about developing a software project?
Developer A
Project
Repository
S/w
Developer B
5. No. 5September 27, 2013
Collaborative development with Git
what about developing a software project?
Developer A
Project
Repository
S/w
User A User D
Developer B
6. No. 6September 27, 2013
Collaborative development with Git
How about developing a software project?
Developer A
Project
Repository
S/w
User A
User D
BUG
Developer B
7. No. 7September 27, 2013
Collaborative development with Git
what about developing a software project?
Developer A Project
Repository
S/w
User A
User D
Developer B
Fixed Code
(patch)
8. No. 8September 27, 2013
Collaborative development with Git
what about developing a software project?
Developer A Project Repository
S/w 1.1
User A
User DFixed Code
(patch)
apply
Developer B
9. No. 9September 27, 2013
Collaborative development with Git
Softwares for Version Control
• Source Code Control System (SCCS)
• CVS
• Subversion (svn)
• Mercurial
• Bazaar
• Git
• Etc...
10. No. 10September 27, 2013
Collaborative development with Git
Git
• Developers : Junio Hamano and Linus Torvalds and several other people
• Website : http://git-scm.com/
• Linus Torvalds started its development on April 2005
• Distributed Version Control System
11. No. 11September 27, 2013
Collaborative development with Git
Distributed Version Control System
12. No. 12September 27, 2013
Collaborative development with Git
Let's Start the Git
• Introduce yourself to git
– git config –global user.name “Vimal Joseph”
– git config –global user.email “vimal.joseph@zyxware.com”
• Add some colour
– git config –global color.ui true
• Now your global configuration file is ready. You can check that at ~/.gitconfig
13. No. 13September 27, 2013
Collaborative development with Git
Git Repository
• Create a git repository
– mkdir your-directory-name
– git init
• Add initial files to the git repository
– git add file1 file2
• Commit changes
– git commit
– (it will ask you to enter a comment)
• Log and status
– git log
– git status
• Help
– git help
14. No. 14September 27, 2013
Collaborative development with Git
Structure of Git
15. No. 15September 27, 2013
Collaborative development with Git
Head, Branches, Tags
16. No. 16September 27, 2013
Collaborative development with Git
Branching, Merging and tagging
• Create new branch and switch to it
– git branch name-of-branch
– git checkout name-of-branch
• Merge branches
– git merge name-of-branch-to-merge-with-current-branch
– Merge conflicts should be resolved manually
• Tagging
– git tag tag-name
– It will create a tag in the current git object pointed by the HEAD
17. No. 17September 27, 2013
Collaborative development with Git
Working with remote repositaries
• Add a remote repository
– git remote add origin url-of-remote-repository
• Push Pull
– git pull
– Pull the remote branch to the local branch
– git push origin master
– Push the change to the remote branch
19. No. 19September 27, 2013
Collaborative development with Git
Working with remote repositaries
• Add a remote repository
– git remote add origin url-of-remote-repository
• Push Pull
– git pull
– Pull the remote branch to the local branch
– git push origin master
– Push the change to the remote branch
20. No. 20September 27, 2013
Collaborative development with Git
On-line git hosting
• http://gitorious.org/
• http://github.com
• Gitolite
21. No. 21September 27, 2013
Collaborative development with Git
Thanks...
• http://git-scm.com/documentation
• questions??
vimal.joseph@zyxware.com
Zyxware Technologies