git workflow in agile development

Post on 25-May-2015

561 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Git workflow in Agine web development

TRANSCRIPT

Git Workflow in Agile Development

Codemy.netpresents

What is Git?

Source Code Management

Why Git?

Better Team Management

More Efficient Workflow

More Control

Basic Git Commandsgit init - setup git in current directory!

git status - view current status!

git add . - adds files to staging area!

git branch [branch-name] - creates branch!

git checkout [branch-name] - change working branch to specified one!

git commit -m ‘message’ - creates a commit from staging!

git merge [branch-name] - merges specified branch into current!

git log - prints out a log of past commits

git init

creates a .git folder in the current directory

Master

git add .

staging

staging

git add .

git commit -m ‘changed color on button’

stagingcommit

master

stagingcommit

git branch develop

master

stagingcommit

develop

git checkout develop

stagingcommit

master

develop

git commit -am ‘blah blah’

stagingcommit

master

develop

commit

stagingcommit

master

develop

commitcommit

git commit -am ‘blah blah again’

stagingcommit

master

develop

commitcommitcommit

git commit -am ‘blah blah and again’

oh noes! something went wrong with the site in production!

no problem!

stagingcommit

master

develop

commitcommitcommit

master

develop

git checkout master

stagingcommitcommitcommitcommit

master

git checkout -b hotfix

develop

stagingcommitcommitcommitcommit

KRWĆ[checkout -b means create a new branch and switch to that branch

git commit -am ‘fix bug in production’

master

develop

stagingcommitcommitcommitcommit

KRWĆ[

commit

master

KRWĆ[

git checkout master

develop

stagingcommitcommitcommitcommit

commit

master

KRWĆ[

stagingcommitcommitcommitcommit

commit

git merge hotfix

master

stagingcommitcommitcommitcommit

commit

git branch -d hotfix

develop

ok we’re done developing our feature lets merge and deploy

master

stagingcommitcommitcommitcommit

commit

develop

master

commitcommitcommitcommit

commit

develop

git merge develop

commit

git branch -d developmaster

commitcommitcommitcommit

commit

commit

master

commitcommitcommitcommit

commit

commit

staging

top related