2022-11-28
|~1 min read
|56 words
A quick tip today which is really combining several commands in a useful way. When you want to see which files changed and by how much…
2022-11-28
|~1 min read
|147 words
One of the ways I attempted to fix my problem when my upstream repo was rejecting my pushed changes was to reset my remote. This was a…
2022-11-28
|~2 min read
|303 words
Recently, I was doing something I’ve done numerous times: pushing a new branch up to Github. This time, however, I hit a wall. Or, more…
2022-11-28
|~4 min read
|780 words
Problem Statement Imagine you’re working on a stacked diff - a change set that builds on another change set that has not yet been merged to…
2022-11-28
|~1 min read
|167 words
An (increasingly) common practice is for folder structure to influence behavior of applications. This is standard in php if I’m not mistaken…
2022-11-28
|~1 min read
|68 words
In VSCode, there’s a built in git blame feature that will allow you to inspect who is responsible for the last change to a line. This is…
2022-11-28
|~2 min read
|374 words
How can you use Git’s CLI to figure out when a file was initially introduced? When doing so, how do you handle renames? Think of this as…
2022-11-28
|~1 min read
|104 words
By default, Git’s command will only stash the uncommitted changes to tracked files, i.e., files that have already been included in the…
2022-11-28
|~6 min read
|1108 words
In a recent sprint retrospective, a teammate mentioned that we could help ourselves by adding more context to our pull requests. This got me…
2022-11-28
|~2 min read
|293 words
To rename the name of a branch, there are four potential steps: Checkout the existing branch (the one you want to rename): Rename the local…
2022-11-28
|~11 min read
|2010 words
I was recently trying to publish a new version our product when I ran into an issue: the tag already existed and so my command exited with a…
2022-11-28
|~1 min read
|185 words
The most common way to ignore files from git is with a file in a repository. However, that’s not the only way to do it! Other mechanisms…
2022-11-28
|~1 min read
|152 words
Deleting a git submodule is a potentially confusing aspect of working with them. This is because while they can be removed from some…
2022-11-28
|~1 min read
|155 words
Git Submodules can be really useful, but they’re not always straightforward to use. Today, I want to explore the API a bit. The full API…
2022-11-28
|~2 min read
|262 words
I ran into an interesting problem today when I bootstrapped a new project with TSDX. The actual steps I took to create the problem seem…
2022-11-28
|~10 min read
|1834 words
Unless your git workflow is pushing straight to master (because YOLO), it’s likely that your local repository will grow unwieldy in time…
2022-11-28
|~6 min read
|1153 words
Intro I’ve previously looked into different strategies for reconciling branches once an underlying branch has been rebased (see Git Rebase…
2022-11-28
|~7 min read
|1397 words
Update I wrote a follow up to this walking through similar examples in Git Rebase On Rebased Branches and Other Fun, Redux. Recently, I ran…
2022-11-28
|~5 min read
|837 words
Many moons ago, I had an idea for a utility to handle pushing a new branch to my origin. That is, I wanted to avoid this situation: would…
2022-11-28
|~2 min read
|242 words
In the past, I’ve written about diving into the git log with grep and the pickaxe. Those do not search by the author of a commit, however…
2022-11-28
|~3 min read
|588 words
Back when I was first learning git, one of the tricks I found was a fantastic alias for information dense git log, which I added to my…
2022-11-28
|~2 min read
|303 words
At Olo, we rebase our commits rather than merge to keep a cleaner git history. As with all things, there are some tradeoffs to this approach…
2022-11-28
|~2 min read
|386 words
When using git as a version control and rebasing, it’s quite easy to get into a state where your local has diverged from the remote in ways…
2022-11-28
|~2 min read
|386 words
Git flow is a superset of the Feature Branch workflow. It’s particularly useful for larger projects such as those with a regular release…
2022-11-28
|~13 min read
|2494 words
I was having a discussion with some friends recently when they mentioned that were using Git’s Submodules to manage the content for their…
2022-11-28
|~7 min read
|1347 words
Recently, I had to do something I’d done dozens, if not hundreds of times before: pull down a colleague’s code so that I could test it…
2022-11-28
|~1 min read
|141 words
The more I get into interactive rebases, the more questions I have about how all of the options work. In particular, one question I wasn’t…
2022-11-28
|~5 min read
|873 words
Of late, I’ve been getting more and more interested in learning about how to write better commits. This has led me to discover not only how…
2022-11-28
|~5 min read
|856 words
The command for Git is still experimental, but is a more intuitive solution to some of the problems I’ve come across regularly. Similarly…
2022-11-28
|~3 min read
|498 words
What Is Pruning? Pruning is part of the Git’s garbage collection. It’s a way to prune references to unreachable or “orphaned” Git objects…
2022-11-28
|~12 min read
|2379 words
A few months ago I wrote about wanting to get more familiar with when I was learning to write better commits. I didn’t follow up on my…
2022-11-28
|~2 min read
|334 words
One resource I find really useful is Github’s collection of files for different programming languages and frameworks. I find myself…
2022-11-28
|~4 min read
|704 words
I’ve written about git reset vs. git revert before. I’ve even looked at some patterns for “undoing” in git. This is a closer look at git…
2022-11-28
|~2 min read
|341 words
Recently I was working on a project structured as a mono repo - smaller projects within a larger maintained their own dependencies. I wanted…
2022-11-28
|~3 min read
|540 words
When adding files to my git staging area, I tend to like to review specific files and do so interactively using the flag to patch. This…
2022-11-28
|~4 min read
|791 words
.gitconfig follow-up with .bash_profille In my previous Git posts (here and here), I noted that one of the things I found really helpful was…
2022-11-28
|~8 min read
|1580 words
I’ve been trying to learn more about Git recently. I thought I’d write up some of the lessons I’ve learned to create a basic primer on Git…
2022-11-28
|~1 min read
|121 words
Commonly used Git commands that are worth remembering (or having a quick reference like this one for): Undo your last commit: 1 (Stack…
2022-11-28
|~1 min read
|156 words
Frequently, I find myself wanting to create a temporary clone of a repository. This often happens when something’s gone wrong and I want to…
2022-11-28
|~4 min read
|797 words
Today, I had an interesting experience with Git. I was working on a new project and when I was ready to make my initial commit, I noticed…
2022-11-28
|~2 min read
|231 words
Continuing my catalog of errors (and how to resolve them), yesterday offered a brand new one for me. I was trying to push some local…
2022-11-28
|~7 min read
|1229 words
In his talk “A Branch In Time” (which I wrote about previously, Tekin Süleyman discussed how an engineer can explore the git history to…
2022-11-28
|~2 min read
|313 words
In his talk “A Branch In Time” (which I wrote about recently in Write Better Commit Messages, Tekin Süleyman has an offhand comment that I…
2022-11-28
|~3 min read
|540 words
Update: I kept using this approach and recently found an even simpler way to checkout remote branches. I wrote more about it in Git…
2022-11-28
|~1 min read
|193 words
From this StackOverflow answer: I always thought HEAD~5 means GO to 5 commits before. But it doesn’t carry the GO part of the command. It…
2022-11-28
|~7 min read
|1286 words
I recently made a small contribution to a VS Code extension on Github. In addition to evaluating the code, the maintainer, @roblourens, went…
2022-11-28
|~2 min read
|221 words
In pulling together my recent post on Git Cherry Pick, I wanted to show all of the files included in a single commit. As is often the case…
2022-11-28
|~3 min read
|505 words
Yesterday, I wrote about how to pull a specific files from another branch into your branch. But what if you want to pull in all of the…
2022-11-28
|~2 min read
|382 words
Frequently, I want to pull in just a single file from another git branch. I always need to look up the specifics, so I’m documenting it to…
2022-11-28
|~3 min read
|575 words
When you pull a repository down (i.e. clone it) from a remote (like Github, Gitlab, or a private host), git will automatically add it as a…
2022-11-28
|~3 min read
|549 words
I got into a bit of a mess earlier today when I accidentally checked out an old state of my current branch without creating a new branch for…
2022-11-28
|~2 min read
|364 words
Every time I cut a new branch in Git and am ready to submit a PR for review, I get an annoying error reminding me that I need to set the…
2022-11-28
|~2 min read
|267 words
I have a habit of making longer git branch names. I use the branch name as a way to communicate what and why I’m working on something. For…
2022-11-28
|~3 min read
|517 words
Starting this morning, I was suddenly unable to update my repositories on Github. As I’d written about in the past, I prefer using SSH over…
2022-11-28
|~1 min read
|157 words
Adding a message to a stash is a great way to easily identify what’s included in a stash. This can be particularly helpful if you’re only…
2022-11-28
|~2 min read
|261 words
Sometimes you only want to stash a few files at a time. Maybe in the course of your work, the files you were changing revealed a bigger…
2022-11-28
|~1 min read
|180 words
Often when I get a merge conflict, what I really want to do is defer to the master branch, so, if I’m on a branch and I want to merge in the…
2022-11-28
|~3 min read
|439 words
I find myself writing the following command multiple times daily. I had been reading a little about bash functions and wanted to see if I…
2022-11-28
|~4 min read
|622 words
The Feature Branch Workflow for git is a graduation from the Centralized workflow where all changes are made directly to the master branch.…
2022-11-28
|~3 min read
|461 words
Git Clone, Pull, and Push Continuing my learnings re: Git. I wanted to better understand the use cases for three Git commands: 1. Clone…