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 email@example.com: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.
We’ve blogged about Git gamification before. Now, Gary Rennie has released Githug which challenges players to complete levels and learn Git features at the same time. Levels are created using a Ruby-based DSL:
description "There is a file in your folder called README, you should add it to your staging area"
return false unless repo.status.files.keys.include?("README")
return false if repo.status.files["README"].untracked
puts "You can type `git` in your shell to get a list of available git commands"
Got an idea for a Githug level? Submit a patch.
First there was
finger. Then there was web finger. Now Daniel Choi brings you gitfinger. Just install the gem and you can get a project summary for any GitHub user:
$ gitfinger pengwynn
repo w f i updated pushed type desc
octokit 153 43 6 Jan 25 2012 Jan 21 2012 source Simple Ruby wrapper for the GitHub v2, v3 API and feeds
faraday_middleware 80 17 0 Jan 24 2012 Jan 24 2012 source Various Faraday middlewares for my Faraday-based API wrappers
fumblr 56 11 4 Jan 24 2012 Dec 14 2011 source Stop fumbling with your Tumblr theme development - mashup of my own process with Thimblr
dotfiles 3 1 0 Jan 24 2012 Jan 24 2012 source My public dotfiles
linkedin 384 171 31 Jan 24 2012 Jan 17 2012 source Ruby wrapper for the LinkedIn API
compass_formalize 76 6 1 Jan 23 2012 Nov 15 2011 source Compass and Sass port of Nathan Smith's Formalize project
ujs_sort_helper 14 9 1 Jan 22 2012 Oct 14 2011 source Unobtrusive sort helper for Rails
groupon 17 9 1 Jan 22 2012 Jan 11 2012 source Ruby wrapper for the Groupon API
guard-sass 3 0 0 Jan 20 2012 Apr 26 2011 fork Guard::Sass automatically rebuilds sass files when modified (like sass --watch)
topsy 25 6 1 Jan 15 2012 Jan 05 2012 source Ruby wrapper for the Topsy.com Otter API
compass-wordpress 67 15 3 Jan 15 2012 Jan 08 2012 source Compass plugin for creating WordPress themes using Sass
transparency-data 14 5 0 Jan 12 2012 Jan 07 2011 source Wrapper for the Sunlight Transparency Data API
presto 29 4 0 Jan 07 2012 Jun 14 2010 source Padrino + NestaCMS
oh-my-zsh 5 2 0 Jan 05 2012 Nov 25 2011 fork A community-driven framework for managing your zsh configuration. Includes optional plugins for various tools (rails, g...
chargify 67 22 1 Jan 01 2012 May 21 2011 source Ruby wrapper for the chargify.com SAAS and billing API
gowalla 66 21 2 Dec 28 2011 Nov 02 2011 source Ruby wrapper for the Gowalla API.
compass-twitter-bootstrap 1 0 0 Nov 30 2011 Nov 30 2011 fork The twitter bootstrap ported to compass
pt 1 0 0 Nov 23 2011 Nov 23 2011 fork Minimal client to use Pivotal Tracker from the console.
nesta-plugin-sluggable 5 3 0 Nov 19 2011 Sep 25 2011 source Sluggable posts for Nesta CMS
nesta-plugin-linkable 2 2 0 Nov 19 2011 Sep 25 2011 source Easy link posts for Nesta CMS
tmuxinator 1 0 0 Nov 11 2011 Nov 11 2011 fork Manage complex tmux sessions easily
thimblr 1 1 0 Nov 05 2011 Nov 05 2011 fork Thimblr (a rewrite of mwunch's excellent Thimble) is stand alone Ruby app that will help you in designing your Tumblr t...
zocial 2 0 0 Oct 27 2011 Sep 25 2011 fork Zocial CSS3 button set and vector icons with @font-face as a Sass mixin and usable as a Compass extension
nesta-plugin-project-meta 3 2 0 Oct 12 2011 Oct 12 2011 source Plugin for Nesta CMS to show Github, Rubygems data for projects
buzzsprout 4 1 0 Oct 10 2011 Oct 10 2011 source Ruby wrapper for the ghost Buzzsprout API
thor-tasks 6 1 0 Oct 08 2011 May 06 2011 source Utility thor scripts
nestacms.com 1 0 0 Oct 04 2011 Sep 25 2011 fork The web site for Nesta CMS
ti-vim-snippet 1 0 0 Oct 04 2011 Jun 22 2011 fork `ti` snippets for writing `coffescript` and `sass`
compass 1 0 0 Oct 04 2011 Aug 12 2011 fork Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.
powder 4 2 0 Oct 04 2011 Apr 09 2011 fork Syntactic suger for http://pow.cx/
geera 2 0 0 Oct 04 2011 Mar 30 2011 fork A commandline client for JIRA
textmate-themes 3 1 0 Oct 04 2011 Jan 14 2011 source My TextMate themes
nesta 1 0 0 Oct 04 2011 Aug 27 2011 fork A lightweight CMS, implemented in Sinatra.
faraday 2 0 0 Oct 04 2011 Oct 12 2010 fork experiments in a rest api lib
mush 2 1 0 Oct 04 2011 Aug 27 2010 fork A Multi-service URL Shortener gem with command-line utility (bit.ly, is.gd and u.nu supported)
wynnnetherland.com 1 1 0 Oct 04 2011 Jan 06 2011 source My personal web site powered by Presto
oauth2 1 1 0 Oct 04 2011 Jun 28 2010 fork A Ruby wrapper for the OAuth 2.0 protocol.
formstack 7 2 0 Oct 04 2011 May 23 2010 source Ruby wrapper for the Formstack API
twitter 2 1 0 Oct 04 2011 Mar 30 2010 fork API wrapper for Twitter and Twitter Search API's
tumblr 4 1 0 Oct 04 2011 Aug 07 2010 fork Ruby library and command line utility for Tumblr
plancast 12 1 0 Oct 04 2011 Jun 16 2010 source Wrapper for the unpublished Plancast API
weary 3 1 0 Oct 04 2011 Mar 31 2010 fork A little DSL for consuming RESTful web services.
twitterland 10 2 0 Oct 04 2011 Apr 05 2010 fork Ruby wrapper for various Twitter-related APIs
giact 2 1 0 Oct 04 2011 Apr 01 2010 source Ruby wrapper for the Giact POST API
chunky-baconfile 14 1 0 Oct 04 2011 Jan 07 2010 source Tasty wrapper for the Baconfile API
authentic_jobs 3 2 0 Oct 04 2011 Jun 12 2010 source Find your next gig from the console. Ruby wrapper for the Authentic Jobs API
backtweets_helper 5 1 0 Oct 04 2011 Dec 02 2009 source Rails helper for Backtweets widgets
nextstop 4 1 0 Oct 04 2011 Nov 18 2009 source Ruby wrapper for the Nextstop.com API
readernaut 4 3 0 Oct 04 2011 Nov 18 2009 source Ruby wrapper for the Readernaut social reading site API
In a fresh commit, Rails edge now has the ability to automatically add query plan info to the standard Rails logger:
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
… which will yield something like:
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
| 1 | SIMPLE | users | const | PRIMARY | PRIMARY | 4 | const | 1 | |
| 1 | SIMPLE | posts | ALL | NULL | NULL | NULL | NULL | 1 | Using where |
2 rows in set (0.00 sec)
Always on the lookout for Git timesavers, I’m a regular user of Vincent Driessen’s
git-flow and TJ’s
git-extras. The newest addition to my git toolbox is
git-grep-diff from Oscar Del Ben. This simple bash script allows you to search your git diff history and look for a given search pattern:
git grep-diff <number_of_revisions_to_search> <query>
The search results output even supports terminal colors. I’d love to see a nice
man page like those found in git-extras. If you would, too, why not fork the project and contribute?