git workflow in agile development

28
Git Workflow in Agile Development Codemy.net presents

Upload: sakchai-siripanyawuth

Post on 25-May-2015

561 views

Category:

Software


0 download

DESCRIPTION

Git workflow in Agine web development

TRANSCRIPT

Page 1: Git workflow in agile development

Git Workflow in Agile Development

Codemy.netpresents

Page 2: Git workflow in agile development

What is Git?

Source Code Management

Page 3: Git workflow in agile development

Why Git?

Better Team Management

More Efficient Workflow

More Control

Page 4: Git workflow in agile development

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

Page 5: Git workflow in agile development

git init

creates a .git folder in the current directory

Master

Page 6: Git workflow in agile development

git add .

staging

Page 7: Git workflow in agile development

staging

git add .

Page 8: Git workflow in agile development

git commit -m ‘changed color on button’

stagingcommit

Page 9: Git workflow in agile development

master

stagingcommit

Page 10: Git workflow in agile development

git branch develop

master

stagingcommit

develop

Page 11: Git workflow in agile development

git checkout develop

stagingcommit

master

develop

Page 12: Git workflow in agile development

git commit -am ‘blah blah’

stagingcommit

master

develop

commit

Page 13: Git workflow in agile development

stagingcommit

master

develop

commitcommit

git commit -am ‘blah blah again’

Page 14: Git workflow in agile development

stagingcommit

master

develop

commitcommitcommit

git commit -am ‘blah blah and again’

Page 15: Git workflow in agile development

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

Page 16: Git workflow in agile development

no problem!

Page 17: Git workflow in agile development

stagingcommit

master

develop

commitcommitcommit

Page 18: Git workflow in agile development

master

develop

git checkout master

stagingcommitcommitcommitcommit

Page 19: Git workflow in agile development

master

git checkout -b hotfix

develop

stagingcommitcommitcommitcommit

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

Page 20: Git workflow in agile development

git commit -am ‘fix bug in production’

master

develop

stagingcommitcommitcommitcommit

KRWĆ[

commit

Page 21: Git workflow in agile development

master

KRWĆ[

git checkout master

develop

stagingcommitcommitcommitcommit

commit

Page 22: Git workflow in agile development

master

KRWĆ[

stagingcommitcommitcommitcommit

commit

git merge hotfix

Page 23: Git workflow in agile development

master

stagingcommitcommitcommitcommit

commit

git branch -d hotfix

develop

Page 24: Git workflow in agile development

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

Page 25: Git workflow in agile development

master

stagingcommitcommitcommitcommit

commit

develop

Page 26: Git workflow in agile development

master

commitcommitcommitcommit

commit

develop

git merge develop

commit

Page 27: Git workflow in agile development

git branch -d developmaster

commitcommitcommitcommit

commit

commit

Page 28: Git workflow in agile development

master

commitcommitcommitcommit

commit

commit

staging