This makes heavy use of fzf, which is a command-line fuzzy finder. You can stage and unstage files fuzzily found by the tool and commit interactively.
This is a call for solidarity and a love letter to good commit messages. Read this to find out why it’s worth to care about commit messages and how to get better at writing them.
gitpertmeasures the “pertinence” of git authors as a time-decayed measure of LOC added and removed to a repository (or a set of files in a repository). It’s meant to help identify who the most relevant contributors are based on commit recency, frequency and impact.
Cool tool, as long as we don’t forget about non-code contributors.
Delta provides language syntax-highlighting, within-line insertion/deletion detection, and restructured diff output for git on the command line. All the syntax-highlighting color themes that are available with bat are available with delta. Here’s what
git showlooks like when git is configured to use delta as its pager:
Written in C++ and powered by Qt 5. #notelectron
I like Git commit messages. Used well, I think they’re one of the most powerful tools available to document a codebase over its lifetime. I’d like to illustrate that by showing you my favourite ever Git commit.
6-ish paragraphs of explanation for a single whitespace change in the code.
The New Stack takes us on a fun trip down memory lane:
Fifteen years ago a number of the Linux kernel developers tossed their hands in the air and gave up on their version control system, BitKeeper. Why? The man who held the copyright for BitKeeper, Larry McVoy, withdrew free use of his product on claims that one of the kernel devs had reverse engineered one of the BitKeeper protocols.
Linux creator Linus Torvalds sought out a replacement to house the Linux kernel code. After careful consideration, Torvalds realized none of the available options were efficient enough to meet his needs:
In short, I use git branches very rarely, preferring to work on my local master branch almost every time. When I want to work on multiple tasks in the same repository (i.e. often), I just… work on all of them on master. I waste no time creating a new branch, or switching to another branch to change contexts; I just start writing code and committing changes, all directly on master, intermixing different workstreams freely. This reduces my startup time to zero, both for starting new tasks and revisiting old work.
If the blog post ended here, you might think Drew is crazy. But he goes on to explain how he uses rebase to clean things up before pushing upstream.
I enjoy hanging out on master quite a bit, myself. However, when I’m ready to take on something “big” or “gnarly” I don’t hesitate to
git checkout -b and work from there.
One of the great things about Git is everyone can develop their own branching strategies. One of the terrible things about Git is everyone has to develop their own branching strategies. In this quick post on the Adeva blog, Vedrana Tozija describes a strategy she believes is on point for small teams.
tickgitis a tool for software developers to do project management within their codebase. It searches code comments for markers indicating areas and files worth returning to (
FIXME, etc). It can be used to proactively identify areas of technical debt, or handle day-to-day to-do items and checklists.
Free for public repos and open source.
A handy little web app for quickly finding the
droids code you’re looking for.
grep.app searches code from over a half million public repositories on GitHub. We’re hoping to add more soon…
It searches for the exact string you enter, including any punctuation or other characters. You can also search by regular expression, using the RE2 syntax.
GistPad is a Visual Studio Code extension that allows you to manage GitHub Gists entirely within the editor. You can open, create, delete, fork, star and clone gists, and then seamlessly begin editing files as if they were local.
The big idea here is to use gists to seamlessly create your “very own developer library”. The interactive playgrounds is pretty cool, too.
Don’t use this, but do check it out if you want to learn more about how Git works. Or about how POSIX shell works. Or both!
Onefetch is a command line tool that displays information about your Git project directly on your terminal. Onefetch supports almost 50 different programming languages. If your language of choice isn’t supported: Open up an issue and support will be added.
I’ve used Git for over a decade, but it doesn’t matter. Every single time I read a post like this one where somebody shares their aliases/shortcuts/etc, I pick up something new. Every. Single. Time.
What’s fun about this post is Victor also does the math to see if he’s actually saving himself time with all these aliases.
Assuming I type ~100 Git commands in an average 8-hour workday, that’s 550 characters saved, which converts to about one minute saved per day
That isn’t much time saved, but it still feels good, and that counts for something!
This changes not only who authored the commit but the listed commiter as well. It also is something I wrote as a joke, so please don’t run this against your production repo and complain if this script deletes everything.
Alias this to
git-take-the-credit so you can put your name on that awesome commit your co-worker made the other day. 😜
gitomatic <path> 2019/08/03 00:16:48 Checking repository: /tmp/gitomatic-test/ 2019/08/03 00:16:48 Pulling changes... 2019/08/03 00:16:49 New file detected: hello_world.txt 2019/08/03 00:16:49 Adding file to work-tree: hello_world.txt 2019/08/03 00:16:49 Creating commit: Add hello_world.txt. 2019/08/03 00:16:49 Pushing changes... 2019/08/03 00:16:53 Sleeping until next check in 10s... 2019/08/03 00:17:03 Checking repository: /tmp/gitomatic-test/ 2019/08/03 00:17:03 Pulling changes... 2019/08/03 00:17:07 Deleted file detected: hello_world.txt 2019/08/03 00:17:07 Removing file from work-tree: hello_world.txt 2019/08/03 00:17:07 Creating commit: Remove hello_world.txt. 2019/08/03 00:17:07 Pushing changes...
The 2.0 release of Github Desktop shipped yesterday. Here’s a quick breakdown of what’s new…
You can resolve merge conflicts more easily, co-author commits to share credit with others, and check out your GitHub pull requests. And with the 2.0 release, rebasing and stashing are now also supported on GitHub Desktop—the two most requested features.
11, 12, and 14 were new to me.
Here is a list of 15 Git commands you may not know yet, but hopefully they will help you out on a journey to master this tool.
This is actually my second stab at it, so big blocks will land in place from my first attempt. I’m trying again this year after reading more of “Programming Rust” (Blandy, Orendorff).
Follow along for fun and education.
I’ve been a developer for 13 years, and for the life of me, I can’t remember the syntax for amending commits or even reversing them. Thank goodness for a page like this which I’ve bookmarked for easy reference when (inevitably) I make a mistake.
You can search from commits, inspect indvidual files and changes in the commits, see ahead/behind commits etc. It is an alternative and interactive way to explore the commit history. Also, you can explore your current state by investigating diffs, stage your changes and commit them.
Any git repository contains a tonne of information about commits, contributors, and files. Extracting this information is not always trivial, mostly because of a gadzillion options to a gadzillion git commands – I don’t think there is a single person alive who knows them all. Probably not even Linus Torvalds himself :)
Truth. Clone the repo here and
make install or
brew install git-quick-stats if you’re on macOS.
Ire Aderinokun on her blog bitsofcode:
I prefer to interface with git via the command line, at least for the simple commands. However, I’m a bit lazy, and don’t like having to repeatedly type out the same long commands multiple times a day. Over the years, I have created some short aliases that allow me to more quickly use git via the command line.
Creating aliases for common commands is definitely the way to go. I do something similar in my dotfiles, except I categorize aliases by the language or technology.