Simon says git rebase origin master: Version control explained through interpretive dance and charades

From DevSummit
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

This was an extremely imaginative and productive session. By making themselves to be physical representations of the lines in a file being modified, Reanne and Erik demonstrated abstract terms like branching, committing, conflicts and merging.


The audience was left with these important take aways:

  • Version control is essential.
  • Use it and you can relax and be more productive, since you know you code is always there.
  • Git is a great tool and is the preferred versioning tool at Quilted (the company that the presenters work for).
  • The workflow of using a version control system. (checkout, branch, work, checkout clean, commit branch)
  • Never checkin a password!

Intros

Colin, Reanne & Erik love git

Love that the code is always all still there, and can be more relaxed.

Brianna, Teesha, Josh, Rick, Lisa, Jack, Karen and Skip attended.

People interested in Git, heard it would be interested and had Party Hats.

Has been no practice. It will be winged.

Nice roll-backs. With teams of developers, need it. Overwriting work,

Colin uses it for everything even small. Like the practice.

Start with small text file (morning.txt)

Not going to discuss collabortion part (getting things to other developers)

Need to have GIT running on your computer.

went to directory

typed "git init"

on master branch (by default)

"git status"

found untracked files 'morning.txt'

"git add ."

"git commit" commits changes

"git log" shows log of commands

"git" gives you list of commands

"git ..."

best make a branch

erik moves behind Reanne

"give branch erik"

"git checkout erik"

"git branch" shows you have 2 branches (erik and master)

modified morning txt

"git status" shows difference

"git diff"

"git add" morning.txt


Want to strive for each commit to be a comprehensive item. (not huge, cause can't undo half of it.)

"git -commit -m "adding party hat for eric

"git status 'on branch erik'

get checkout master 'switched to branch erik'

git log shows only one commit.

"git merge erik"

git diff erik No differences


           interactive rebase


"git checkout" erik gets branch erik

git status

put on aspiration shirt

git add morning.txt

git commit

git status

git add morning.txt Staging a commit)

git commit

git merge


Get a conflict.


<<<<<<<<<<HEAD

  1. Scarf

=

  1. Aspiration T-Shirt
  2. Black hoodi

>>>>>>>>>>>erik


git add morning.txt


rebase master pulling into master


better to just commit small and often git hub, each developer has a full copy


git push where it goes, default is origin its like cleaning up while your cooking, so when y but don't want to break the build

get checkout master

get push origin master git pull origin master

keep master very clean.

workflow

           get master
           do work
           check out clean
           merge it in

Forking is different clone drupal push it up nicer for people to then put it back in

binary files, test script, etc. it all goes in

don't check in your password.

Overcomes developer fear.