With 37 (yes, I counted them) Git commands to add to your arsenal, git-extras is pretty awesome. A few of my favs include
git-effort, and of course
git-changelog‘s name, not its functionality. I’m with Olivie on this one.)
Kate Hudson’s Flight Rules for Git borrows from NASA’s Flight Rules style. The result is a recipe-style collection of Git tips & tricks to get you out of a jam.
Still early days, but pretty cool tech coming from the team at Gitchain:
Gitchain is an application of the exciting ideas behind Bitcoin, Namecoin and DHT applied to Git hosting. Once you install it, it acts as a local proxy to the entire Gitchain P2P network.
I love seeing the Bitcoin protocol (perhaps the crypto-currency’s greatest virtue) applied to different domains.
Looks like the project has been Kickstarted as well. It should be fun to follow along and see where the community takes it.
Gogs looks like a nice, new (still in Alpha) option if you want to self-host some Git repositories with a web interface similar to GitHub’s.
It’s written purely in Go, so installation should be dead simple. From the README:
Gogs only needs one binary to setup your own project hosting on the fly!
Worth a look.
There’s a lot of innovation (and iteration) going on in the online publishing space. GitBook continues that trend by offering a command line tool built specifically for creating programming book and exercises.
You write your book in Markdown and from that GitBook can generate a static website, PDF, eBook, and even JSON. Here’s what the results look like:
The only problem I see with gitsh is reversing years of Git muscle memory with
git appended to each command.
Git commands tend to come in groups. Avoid typing
git over and over and over by running them in a dedicated git shell.
git over and over isn’t the only reason you should check out this project by thoughtbot — check out the answers to Why should you use gitsh? in the readme.
They chose Mercurial.
Our engineers were comfortable with Git and we preferred to stay with a familiar tool, so we took a long, hard look at improving it to work at scale. After much deliberation, we concluded that Git’s internals would be difficult to work with for an ambitious scaling project.
Instead, we chose to improve Mercurial.
Internal open source projects like hgwatchman and remotefilelog help them to achieve performance gains from status, clone and pull operations.
Together, the hgwatchman and remotefilelog extensions have improved source control performance for our developers, allowing them to spend more time getting stuff done instead of waiting for their tools.
How many other organizations with large codebases will follow Facebook to drink the Mercurial water too? Facebook’s move to Mercurial should come as good news for Bitbucket as well.
Mercurial or Git? Tell us on Twitter.
Dat is an interesting new project from Max Ogden:
dat is an open source tool that enables the sharing of large datasets, allowing for a decentralized collaboration flow similar to what git offers for source code.
It’s still early days for dat, but its goal is one worth supporting.
Yannick Schutz’ forked project aims to help you find maintained forks of your favorite GitHub repos. You enter the GitHub user/repo and it shows all the forks with sortable metrics such as stars, last updated, and open issues.
Here’s an example result set for the popular-yet-abandoned GitX app.
Githug is a cool new way to learn git by Gary Rennie. From the readme:
Githug is designed to give you a practical way of learning git. It has a series of levels, each utilizing git commands to ensure a correct answer.
If you want to run a GitHub-like system in-house, GitPrep by Yuki Kimoto is worth a look.
The project home page includes a
screenshot, but you can also visit a project hosted on a
public facing installation
and can click around.
There are nice diff pages and you can also get a
The project is still very young, but looks promising.
GitPrep is written in Perl and it is very easy to install, even on a shared host. It can run
its own web server, use any web server supporting PSGI/Plack, and it can
even run in CGI mode for those shared hosts.
GitPrep is built using the Mojolicius web framework and
Twitter Bootstrap. Its source code is on GitHub
and it is licensed under the Artistic license.
dotCloud’s Docker — a project which makes managing Linux containers easy, previously covered here and discussed on episode #89 — is inspiring & enabling a bunch of open source Platforms as a Service (PaaS).
One of the first (and definitely the smallest) of these is Dokku by Jeff Lindsay.
Dokku weighs in at under 1,000 lines of Bash and offers the same git-push-based app deployment made famous by Heroku and emulated by many PaaS providers. After installation and some configuration, you can deploy to your own mini-Heroku using one of the many supported buildpacks.
Here’s what deploying Heroku’s example Node.js app looks like with Dokku:
$ cd node-js-sample
$ git remote add progrium firstname.lastname@example.org:node-js-app
$ git push progrium master
Counting objects: 296, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (296/296), 193.59 KiB, done.
Total 296 (delta 25), reused 276 (delta 13)
remote: -----> Building node-js-app ...
remote: Node.js app detected
remote: -----> Resolving engine versions
... blah blah blah ...
remote: -----> Application deployed:
It’s exciting to see how much can be done with so little code. Dokku is MIT licensed and hosted on GitHub.
Are you paranoid and want to protect your codes at all times?
Gitcrypt is inspired by this document written by Ning Shang, which was in turn inspired by this post. Without these two documents, by people much smarter than me, git-encrypt would not exist.
There is some controversy over using this technique, so do your research and understand the implications of using this tool before you go crazy with it.
Check out the project on GitHub.
From the Kickstarter story:
The main use case this enables is developing offline in environments like ChromeBooks. I worked on Cloud9IDE for a year and it was a great experience as long as you were online with a fast connection. With this library, HTML5 apps will finally be able to do the full developer lifecycle. They can clone from github to the browser’s local file storage when online, work offline using an editor like ACE or CodeMirror, and then when they are online again, they can push their changes back to github. I’ll implement branching, merging, diffing, and as many other awesome common tasks from git as possible.
Tim’s plan is to develop the library in the open and license it under the MIT license. “It will be open sourced on GitHub as soon as the Kickstarter succeeds,” says Tim. Our guess is you’ll be able to fork it here github.com/creationix/js-git on Saturday Mar 30, 11:50am CDT when the Kickstarter funds.
I’m pretty sure that most of you who read The Changelog care about
git. Well, yesterday, 1.8.2 was released!
Of course, linking to the commit that actually did the release isn’t mega-helpful, so here’s a link to the CHANGELOG instead.
My favorite change is this one:
The patterns in .gitignore and .gitattributes files can have
as a pattern that matches 0 or more levels of subdirectory.
foo itself or in a
I find myself wanting this a bunch, so it’s nice to have in. I’m also pumped about ‘git check-ignore’, which helps you figure out if what you added to your
.gitignore actually did what it’s supposed to do.
Discuss on Hacker News
One of the best things about git is that it allows you to do whatever you want.
One of the worst things about git is that it allows you to do whatever you want.
This has lead to a bunch of different ‘workflows’ for managing an open source project. I remember when “Git Flow” hit the scene, and everyone was mega-excited by it. Then, GitHub themselves fired back with “GitHub flow,” which was a bit simpler and talked about how they handle things.
Here’s Yet Another Entry into this ongoing saga: “On GitHub and Workflows” Basically, it’s somewhere in between the two: you have three branches, representing production, staging, and development. On top of development, you work like GitHub Flow, and when things go from development -> staging and staging -> production, there’s an opportunity for a last code review.
As a bonus, there’s a little script at the bottom for making pull requests from the command-line with
hub. Neat! We originally saw this from this tweet by @moo9000.
Git Gutter is a Sublime Text 2 plugin by JD Isaacks which shows an icon in the gutter area indicating whether a line has been inserted, modified, or deleted.
Here’s a snap of the plugin in action:
Not a Sublime Text user? Don’t sulk away with feature envy just yet. Git Gutter has also been ported to Vim and Emacs.
Switch branches as fast as you switch pages. Waiting for a deploy sucks. Allocating a staging server for each remote branch is costly. But nothing beats testing on a staging server with real production data. Divergence allows you to quickly test your remote branches simply by changing the subdomain.
If you’ve ever had the need for a second staging server for an early release of a feature that’s not ready to merge to master, Divergence from LayerVault could be what you’ve been waiting for.
With Divergence you can easily view any branch from your repository on your staging server by using the branch name as the subdomain. Just use your branch name as the sub-domain and Divergence will magically find your branch and serve it up. You can even hook into a number of callbacks to automatically restart Passenger, run
bundle install, or any other task if needed.
It’s a Rack application that acts as a HTTP proxy between you and your web application for rapid testing. Divergence was built with an Apache-Passenger stack in mind, so if you’re wanting to help develop the project further, checkout the contributing section of the readme.
Divergence is a work in progress, and labeled as a beta release. The folks at LayerVault could use a hand with:
- Increased language support
- More stacks supported, (e.g. nginx, Unicorn, etc.)
- HTTPS support built-in
Divergence::Application.configure do |config|
config.git_path = "/path/to/git_root"
config.app_path = "/path/to/app_root"
config.cache_path = "/path/to/cache_root"
config.forward_host = 'localhost'
config.forward_port = 80
config.callbacks :after_swap do
config.callbacks :after_cache, :after_webhook do
bundle_install :path => "vendor/bundle"
config.callbacks :on_branch_discover do |subdomain|
Checkout the repo and readme for detailed instructions on installation and setup. If you’d like to see more stacks supported beyond an Apache-Passenger stack, fork it and help out.
Some of the engineers from Ooyala have released a new project that “makes code reviews fun.” It is a standalone piece of software that you host on your own (they recommend using Vagrant/VirtualBox).
With barkeep you get syntax-highlighted colored diffs, the ability to easily add your own features, a simple CLI, a REST API and plaintext (threadable) emails. Out of the box, barkeep offers many more features that will keep code reviews quick and entertaining. You can use barkeep with any git repo that has a reachable URL.
The team at Ooyala plans on growing barkeep as the community sees fit. Open issues as you play around with it – better yet, fork it and add new features yourself! Their style guidelines are simple: “mimic the style around you.”
You can view a live example, get some more information or browse the source at GitHub.
Thanks to Teespring and everyone who helped us get to our thirty shirt minimum. There’s still time to get yours.
.gitignore templates are awesome, but mashing them up into a new project can be a pain. Simon Whitaker has created a handy shell script to make that easier:
gibo Python vim >> .gitignore
This will copy the contents of GitHub’s Python and vim templates to your
The script also lets you list all the templates in the GitHub project:
Check out the source on GitHub to check out implementation, usage, or how to contribute.
Update: Lucas let us know about gemignore, his Ruby gem for the same task.
GitHubber Brandon Keepers blew a Gaskit at the Bacon conference in London today. Gaskit is a proof of concept for using a local git branch as a backend for an application. The front end is powered by Rack.
Check out the features for functionality or the README for more on how you can contribute. Don’t miss Brandon’s slides on how he made it.