Personal git workflow... for everyone! – for better, collaborative development – What are we trying to accomplish



Personal git workflow... for everyone! – for better, collaborative development – What are we trying to accomplish

0 0


Drupalcamp-Asheville-2015-Presentation

Drupalcamp Asheville Presentation - Personal git workflow, for everyone!

On Github chrisarusso / Drupalcamp-Asheville-2015-Presentation

Personal git workflow... for everyone!

for better, collaborative development

Presentation by Chris Russo

Agenda

  • Brief discussion of what git is
  • Discuss the why of the proposed workflow
  • Look at the theory
  • Do the workflow live
  • Q&A

Prerequesites

It's best if you already...
use git for your development know the git add, commit, push, and pull commands know that I'm sassy

What is git?

  • git is a distributed SCMS software tool optimized for
    • team collaboration
    • documentation
    • deployment

What isn't git?

Lots of things, but we won't talk about any of that.

queue: You should now be in histerics

What are we trying to accomplish

The idea of the proposed workflow ensures that you are...

  • backing up code frequently
  • NOT letting your perfectionism to get in the way of your development
  • sharing the best of your code with your peers regardless of what your journey looked like

What is the workflow

Commit, commit, commit. Did you commit yet? Push up to a personal private repository Rewind history, rewrite, and polish Share away! Rinse, repeat as needed

What does the workflow address?

  • Fear of Commitment. Developers/perfectionists/humans have it.
    • You feel vulnerable
    • The pursuit of “something better”
    • Unrealistic expectations
    • Feeling “trapped”
  • Inconsistent backups due to #FoC.
  • Inefficient development due to #FoC. Preserve your possibly sloppy yet efficient development workflow and share only the best!

What does the workflow address?

How the eff do we do this?

Let's look

git commit, git add, git commit, git add, git commit git push backup-private-repository WIP-branch git reset [commit-before-wip-commits] --hard git checkout [WIP-branch-finished . git add -p git push shared-repository [polished-branch]

Step 1

Commit the good, the bad, the ugly

						git log 4851400 tip of polished code
							git branch -av --contains a7caec284c8fe5d52b3354486de956124fdecfc9
							remotes/chrisarusso/user_revision_sqlsan
							4851400 Final before touching up
							git show 4851400^^^^^^^^ = example
					

Step 2

Find you a nice, private repository

...that nobody knows about
git remote -v
github-shared	git@github.com:chrisarusso/Drupalcamp-Asheville-2015-Presentation.git (fetch)
github-shared	git@github.com:chrisarusso/Drupalcamp-Asheville-2015-Presentation.git (push)
bitbucket-private	git@github.com:chrisarusso/Drupalcamp-Asheville-2015-Presentation.git (fetch)
bitbucket-private	git@github.com:chrisarusso/Drupalcamp-Asheville-2015-Presentation.git (push)
And push, push, push!

Step 2.5

Finish up and polish code in last commit

  • Add helpful comments
  • Make sure DCS isn't after you (Drupal Coding Standards)
  • Test
  • Push up to your private repository
  • NB: Mark the tree

Step 3

Rollback

  • Rollback code to before you made any of your updates. This is likely where master is, or at least was when you left off.

Step 3.5

Checkout polished code to working tree

  • Now we'll bring back all the code we just worked on, but not the commits with them.

Step 3.848

Reset staged files

  • We'll reset everything not with --hard so that nothing is staged

Step 4

Make all new commits

Step 4.5

Verify trees are exactly the same

... complete with #chichi tinkle ...

Step 5

Push to shared repository

Pat yourself on the back.

Fragments

Hit the next arrow...

... to step through ...

... a fragmented slide.

This slide has fragments which are also stepped through in the notes window.

Fragment Styles

There's different types of fragments, like:

grow

shrink

fade-out

current-visible

highlight-red

highlight-blue

Speaker View

There's a speaker view. It includes a timer, preview of the upcoming slide as well as your speaker notes.

Press the S key to try it out.

Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
Personal git workflow... for everyone! for better, collaborative development Presentation by Chris Russo