Leveling Up Your Git Workflow
Code4Lib 2015
Megan Kudzia
Kate Sears
Albion College Library
We git and so can you
- How & why we started
- Early mistakes
- Advanced mistakes
- Things we probably did right
- Cleanup
- Other thoughts
Why/how we started git
- We wanted:
- A better code approval process
- Access to our code from anywhere
- To learn new things on an 'easy' project
- Megan started a repo
- Decided to add Kate later
Defining the Scope!
- Website redesign
- Wordpress child theme
- Incorporated LESS CSS (the other new thing)
- Starting a new project with skills we already knew
Early Mistakes
In brief:
- We looked for the easy way through
- And/or Megan let herself believe git is easy
- We used a git GUI for most commands, rather than the command line
Early Mistakes
Technical Problems:
- Creating a branch...and not checking it out
- Not waiting for the GUI to refresh properly after changes
Things Megan did right
- Decided the best way to learn was to jump in
- Found a more-advanced buddy
Things Kate did right
- Wasn't shy talking about what didn't work
- Found a more-advanced buddy
Things we did right
- Made LOTS of commits
- Made an effort to write useful commit messages
- Shared work space and working hours, so it was easy to address problems quickly
- Made heavy use of white boards and diagramming
- Revisited and revised workflow/understanding
- Took lots of pictures
- Clarified use of terminology
- Worked iteratively
Advanced Mistakes
- First draft workflow didn't work well
- Megan tried to remove the useless branch
- Megan blew things up
- Kate was working with SourceTree and didn't fully understand what she was looking at
- Using a git GUI allowed us to be distracted by the graph
- Our reaction to mistakes was to try again before trying to understand what went wrong
Our Initial Workflow
Cleanup
- Learn new way to approach git (@jessitron)
- Reconsider and re-do workflow
- Not everything in the repo needed to stay in the repo
- Git filter-branch to remove extraneous stuff
- Rebase for conciseness and clarity
Lightbulb 1
We changed our thinking about git progression/directionality
Other Thoughts
- Git is hierarchy-less but workflow can substitute
- Be willing to iterate
- Approach rebase with caution, not fear
- You probably have to make mistakes to learn git
- Work in a team
- Use the command line
- Confusion is normal!
- Don't git when tired/cranky
deck
By Kate Sears
deck
- 429