Git preso to valtech cfml team
-
Upload
saravanamuthu-jayaraj -
Category
Technology
-
view
74 -
download
1
Transcript of Git preso to valtech cfml team
![Page 1: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/1.jpg)
Open Source Collaboration with Git and GitHub
SaravanaMuthu Aka CF Mitrah.
Shamelessly copied slides from other presentations.
![Page 2: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/2.jpg)
DisclaimerI am a hardcore ColdFusion Developer
I’m not a Git expert or pro
![Page 3: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/3.jpg)
No Source Control System =
![Page 4: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/4.jpg)
This is also not source control...
![Page 5: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/5.jpg)
Why you need it•Your code will break (and you won't know why)
•Your hard drive will die
•Taking latest files from FTP is pain
Why you think you don't need it and are wrong•I work alone (you will break your own code)
•My project is small
(projects grow – Facebook used to be 5 files)
![Page 6: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/6.jpg)
Centralized
![Page 7: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/7.jpg)
Centralized Version Control
• Traditional version control system– Server with database– Clients have a working version
• Examples– CVS– Subversion– Visual Source Safe
• Challenges– Multi-developer conflicts– Client/server communication
![Page 8: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/8.jpg)
Centralized Version Control :: Cons
![Page 9: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/9.jpg)
Distributed Version Control
![Page 10: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/10.jpg)
Distributed Version Control
• Authoritative server by convention only
• Every working checkout is a repository
• Get version control even when detached
• Backups are trivial
• Other distributed systems include– Mercurial
– BitKeeper
– Darcs
– Bazaar
![Page 11: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/11.jpg)
![Page 12: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/12.jpg)
I'm an egoistical bastard, and I name all my projects after myself.
First Linux, now git.
-Linus Torvalds
![Page 13: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/13.jpg)
![Page 14: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/14.jpg)
![Page 15: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/15.jpg)
![Page 16: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/16.jpg)
And Now
![Page 17: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/17.jpg)
Git Advantages• Resilience
– No one repository has more data than any other
• Speed– Very fast operations compared to other VCS (I’m looking at you CVS
and Subversion)
• Space– Compression can be done across repository not just per file– Minimizes local size as well as push/pull data transfers
• Simplicity– Object model is very simple
• Large user base with robust tools
![Page 18: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/18.jpg)
1. Fast
![Page 19: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/19.jpg)
Local
2. Local
![Page 20: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/20.jpg)
Distributed
3. Distributed
![Page 21: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/21.jpg)
3. Cheap Branching
![Page 22: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/22.jpg)
Branching
![Page 23: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/23.jpg)
Any Workflow
4.Many Workflows
![Page 24: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/24.jpg)
Failboat.
It’s not perfect.
![Page 25: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/25.jpg)
The downsides
• Complexity• Windows FTL• What's an IDE? (but see egit for Eclipse, plus
Vim and Emacs support, and GUIs)• Still frequent releases
•Cygwin – build yourself•Ubuntu – use Git PPA
![Page 26: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/26.jpg)
The Staging Area
![Page 27: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/27.jpg)
Integration Manager
![Page 28: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/28.jpg)
Benevolent Dictator
![Page 29: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/29.jpg)
Some Commands
• Getting a Repository– git init– git clone
• Commits– git add
– git commit
• Getting information– git help– git status
– git diff
– git log– git show
![Page 30: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/30.jpg)
![Page 31: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/31.jpg)
![Page 33: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/33.jpg)
![Page 34: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/34.jpg)
![Page 35: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/35.jpg)
1. Working on your own projects
2. Helping/ Contribute other OSS projects
![Page 36: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/36.jpg)
Create new repository
![Page 37: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/37.jpg)
After created,Everything you should know and do
![Page 38: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/38.jpg)
Setting git before using github
• Generate SSH key in git ( Local )• $ssh-keygen -t rsa -C "[email protected]"
![Page 39: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/39.jpg)
Copy data in file id_rsa.pub to github
![Page 40: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/40.jpg)
Manage data with github
• $ git config --global user.name "up1"• $ git config --global user.email [email protected]• $ git init• $ touch README• $ git add README• $ git commit -m 'first commit'• $ git remote add origin [email protected]:up1/----
hello_tarad.git• $ git push -u origin master
![Page 41: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/41.jpg)
Manage data with github ( demo )
![Page 42: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/42.jpg)
Manage data with github (demo)
![Page 43: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/43.jpg)
See result at github, Work !!
![Page 44: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/44.jpg)
How to Contribute
1. Fork a repository at GitHub
2. Clone and connect your local repository
3. Write tests, implement functionality
4. Commit your local changes
5. Push your changes to your fork
6. Make a pull request
7. Profit!!
![Page 45: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/45.jpg)
Very good series of blog posts by a CFML developer on Git workflow to contribute to other open source projects.
http://www.silverwareconsulting.com/index.cfm/Git-Workflow
![Page 46: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/46.jpg)
![Page 47: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/47.jpg)
![Page 48: Git preso to valtech cfml team](https://reader034.fdocuments.us/reader034/viewer/2022042615/55a777e71a28ab530a8b474f/html5/thumbnails/48.jpg)