Writing / Git
-
Different ways to use “--patch” in Git
The --patch flag is handy for selectively staging changes in Git. But did you know it can also be used with other Git commands?
-
List your Git branches by recent activity
Sometimes you just want to see your most recent branches. Here's a handy Git alias that will help you do just that.
-
How focused commits make you a better coder
Ten reasons shaping small and focused commits will help you be a more effective developer and ship better software.
-
Why Git blame sucks for understanding WTF code (and what to use instead)
Here's a more powerful way to look back through the history and figure out what's going on with strange and surprising code.
-
Better Git diff output for Ruby, Python, Elixir, Go and more
A small tweak to your Git config that will make the diff output smarter and more language aware
-
Exclude linting & formatting commits when running Git blame
Did you know there's a way to get Git to ignore certain commits when you run the Git blame command?
-
A Git command to jump from a commit SHA to the PR on GitHub
When digging through a commit history it can be useful to see the wider context for a change by viewing the pull request. Here's a neat shortcut that will take you straight there.
-
Proof your thousand-line pull requests result in more bugs
Nobody likes shipping bugs. But did you know you can reduce the number of bugs in your software simply by reducing the size of your pull requests?
-
Git tip: keep your personal business out of .gitignore files
Maintain a global Git ignore file to avoid having to add your system-specific exclusions to your repositories’ .gitignore files.
-
Git tip: committing with verbose mode
Use Git’s verbose mode to see the diff of the changes you are about to commit.
-
KonMari for your Git repositories
Let's give our Git repositories a spring clean with some simple commands and shortcuts for getting rid of unused and redundant branches and references.
-
Git tip: create an alias to amend your last commit
Another simple Git alias, this time for quickly and easily making adjustments to your most recent commit.
-
Git tip: create a Git upstream alias
Here's a simple Git alias to make your life a little easier if you work with feature branches.
-
Delete those pesky untracked files from your Git repository
A short guide to a handy command that makes it easy to clean up untracked files from your Git repositories.
-
A Branch in Time (a story about revision histories)
A talk about software maintainability and the power of our revision histories. I gave this talk at Brighton Ruby and RubyConf in 2018 as well as RubyConf AU in 2019.
-
Resources for creating useful revision histories
Links to resources (videos, blog posts and more) to help you put together more useful revision histories with Git.
-
Git Tips you (Possibly) Didn't Know You Needed
Some simple tips and tricks to help you get the most out of Git and improve your Git workflow.
-
Rails and git submodules can play nice
Information on working with git submodules, including common pitfalls and things to be aware of.