git preso to valtech cfml team

Post on 16-Jul-2015

74 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Open Source Collaboration with Git and GitHub

SaravanaMuthu Aka CF Mitrah.

Shamelessly copied slides from other presentations.

DisclaimerI am a hardcore ColdFusion Developer

I’m not a Git expert or pro

No Source Control System =

This is also not source control...

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)

Centralized

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

Centralized Version Control :: Cons

Distributed Version Control

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

I'm an egoistical bastard, and I name all my projects after myself.

First Linux, now git.

-Linus Torvalds

And Now

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

1. Fast

Local

2. Local

Distributed

3. Distributed

3. Cheap Branching

Branching

Any Workflow

4.Many Workflows

Failboat.

It’s not perfect.

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

The Staging Area

Integration Manager

Benevolent Dictator

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

Now with git goodness as well

1. Working on your own projects

2. Helping/ Contribute other OSS projects

Create new repository

After created,Everything you should know and do

Setting git before using github

• Generate SSH key in git ( Local )• $ssh-keygen -t rsa -C "somkiat_spns@xxx.com"

Copy data in file id_rsa.pub to github

Manage data with github

• $ git config --global user.name "up1"• $ git config --global user.email somkiat_spns@xxx.com• $ git init• $ touch README• $ git add README• $ git commit -m 'first commit'• $ git remote add origin git@github.com:up1/----

hello_tarad.git• $ git push -u origin master

Manage data with github ( demo )

Manage data with github (demo)

See result at github, Work !!

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!!

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

progit.orghttp://git-scm.com

top related