git branching model_for_tap_team

14
Git branching model TAP Team Grzegorz Wilczyński twitter.com/wilq_ github.com/gwilczynski Wrocław 10th October 2012 for

Upload: grzegorz-wilczynski

Post on 06-May-2015

212 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Git branching model_for_tap_team

Git branching model

TAP Team

Grzegorz Wilczyńskitwitter.com/wilq_

github.com/gwilczynski

Wrocław10th October 2012

for

Page 2: Git branching model_for_tap_team

What we are notgoing to talk about ...

Page 3: Git branching model_for_tap_team
Page 4: Git branching model_for_tap_team

1e6758a0f3af82cb3c23f801d861ca65f6d3e446

2a1a174fe56d1c5b754884fb6bce777d0a09feaf

12b2c7af5f40d23a3c8c6642bfedc6789715d2d9

b3c0a9bbbfdbcb1e2df6dfb51adaa6a60baa5e19

Page 5: Git branching model_for_tap_team

$ git branch gw-test

$ git checkout gw-test

$ vim gw-test.txt

$ git add .

$ git commit -m "added something"

$ git push origin gw-test

Page 6: Git branching model_for_tap_team

And the answer is...

Page 7: Git branching model_for_tap_team

New Merge Request

Page 8: Git branching model_for_tap_team
Page 9: Git branching model_for_tap_team

Manual

$ git checkout master$ git fetch origin$ git merge origin/gw-test2$ git push origin master

Page 10: Git branching model_for_tap_team

At this point the repository has all the commits from the original repository, but they are not integrated into the the cloned repository’s local branches.

$ git fetch origin

Page 11: Git branching model_for_tap_team

# Be sure everything is up to date.$ git checkout master$ git pull

# Remove remote tracking branches which no longer exist.$ git remote prune origin

# See what branches are merged.$ git branch -r --merged master

Git Landscaping

Page 12: Git branching model_for_tap_team

# Remote$ git push origin :gw-test

# Local$ git branch -d gw-test

Mr Clean

Page 13: Git branching model_for_tap_team

Branch Prefixing

- You know who is responsible for deleting each branch

- You can find all your branches quickly with tab completion

- You can easily find a teammate’s branch with only a general idea of its name.

Page 14: Git branching model_for_tap_team

http://robots.thoughtbot.com/post/29355216290/git-landscaping

http://robots.thoughtbot.com/post/21306813001/remote-branch

http://gitlabhq.com/

http://git-scm.com/

http://gitimmersion.com/

Sources