iteration cover image

iteration

The Git Episode ⑂

Dec 2, 2019
45:02

Git-ing things done.

A weekly podcast about programming, development, and design.

I'm John, I run a design and development firm that builds apps and websites.

I'm joined by JP:

Hi everyone! I'm a full stack software engineer at a real estate tech start up.

Catch up / What's today's episode about?

  • John: California is on fire 🔥Making my job — complicated

  • Let's talk about git!

  • I recently watched this quick 4 hour course which is going to be my pick: https://frontendmasters.com/courses/git-in-depth/

  • Let's assume that listeners use git daily

Teaching / Learning section

Git at a very high level

  • Version Control
  • Major, major oversimplification: key value store
    • key = hash of data
    • value = data
  • You use the key to retrieve your data (i.e. git checkout is just moving the pointer to the particular commit hash)
  • Three (4 if you count remote) areas where code lives
    • Working: "untracked" files - this is your playground or scratch pad, current "working area"
    • Staging: files that will be part of your next commit. this is like saying, 'hey, I want to add these files and changes to my repo as they are no longer just scratchpad thoughts'
      • this is how git knows what changed between last commit and your current commit
    • Repo: files that git knows about. the repo contains all of your commits
    • Remote: Github, bitbucket, etc

What does your personal / work git workflow look like?

i.e. walk me through how you might use git when you implement a new feature

this can be a longer section where we talk about git / github as it relates to working on a product

  • How often you commit
  • What your commit messages look like
  • PR etiquette
  • Git Squash vs Leaving all the history

Goodies + TIL section

Git Goodie #1: --no-pager

  • Have you ever done a git diff or a git branch and your terminal opens up a "new page"? You can throw in the --no-pager flag and it will display the contents in the same window instead

Git TIL: git commit without the -m flag

  • I learned that the -m flag is only for short commit messages

John: Git Goodie — git stash

  • I only learned this one a year ago, incredibly useful.
  • you can name your stashes!
  • pop + apply
  • git stash list

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode