Touché. It’s on GitHub.
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
gitover and over and over by running them in a dedicated git shell.
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.
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.
Andrew and Adam talk with Sytse Sijbrandij, one of the Co-founders of GitLab, about building GitLab, sustaining open source, community management, and ways to handle a “road map” for your product or project.
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 blame report.
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.
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).
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: remote: http://node-js-app.progriumapp.com
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?
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. E.g.
fooitself or in a subdirectory of
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.
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.
Here’s a snap of the plugin in action:
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.
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
Sample config from the readme:
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 restart_passenger end config.callbacks :after_cache, :after_webhook do bundle_install :path => "vendor/bundle" end config.callbacks :on_branch_discover do |subdomain| case subdomain when "release-1" "test_branch" when "release-2" "other_branch" end end end
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.”
gibo Python vim >> .gitignore
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.
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.
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:
difficulty 1 description "There is a file in your folder called README, you should add it to your staging area" setup do repo.init FileUtils.touch("README") end solution do return false unless repo.status.files.keys.include?("README") return false if repo.status.files["README"].untracked true end hint do puts "You can type `git` in your shell to get a list of available git commands" end
Got an idea for a Githug level? Submit a patch.
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>
You might have seen our post last year on Gitifier, the Git commit notifier for OSX. If you prefer something a bit more *nix-y, check out git-dude from Marcin Kulik. Git-dude is a command line utility that monitors Git repos and provides desktop notifications using Growl on OSX or libnotify on Linux.
Configuration is done in the standard Git way:
git config --global dude.interval 30 git config --global dude.icon ~/.git-dude/github_32.png
Check the README for installation and advanced usage.
$ godaddy buy wynn.fm -- Reading CC Info from .godaddy... -- THANK YOU FOR PURCHASING YOUR DOMAIN WITH GODADDY! -- WHILE OUR SERVERS THINK ABOUT REGISTERING YOUR DOMAIN -- NAME, PLEASE GIVE CAREFUL CONSIDERATION TO THE -- FOLLOWING SPECIAL OFFERS!!! Would you like to also register the following and SAVE 64%? wynn.net wynn.com wynn.org wynn.info wynn.us wynn.mobi (Y/n)? n Would you like to certify this domain for ONLY $4.99/YR (Y/n)? n Would you like a protected registration for ONLY $24.99/YR (Y/n)? n Okay, how about a private registration for ONLY $11.99/YR (Y/n)? n Would you like 10 email addresses & unlimited storage, Online Calendar, 10GB online storage for mobile files, back up & more for ONLY $4.99/MO (Y/n)? n Okay, how about 10 email addresses & unlimited storage for ONLY $2.99/MO (Y/n)? n Okay, how about 5 email addresses & 2GB storage for ONLY $2.49/MO (Y/n)? n Would you like^C It appears you have attempted to interrupt this process. IF YOU DO SO, WE CANNOT GUARANTEE THE FUTURE AVAILABILITY OF WYNN.FM. ARE YOU SURE (y/N)? <enter> GREAT! Let's start over, then! *headdesk* -- THANK YOU FOR PURCHASING YOUR DOMAIN WITH GODADDY! -- WHILE OUR SERVERS THINK ABOUT REGISTERING YOUR DOMAIN -- NAME, PLEASE GIVE CAREFUL CONSIDERATION TO THE -- FOLLOWING SPECIAL OFFERS!!! ....
Brandon Mathis from the Compass core team, Octopress, and Fancy Buttons fame has created HSLPicker.com, a quick-and-dirty Hue Saturation Luminosity color picker. As a designer, I love HSL as it’s the most human-friendly format for specifying colors.
Here’s a quick screencast
Kenneth and Wynn caught up with GitHubber Scott Chacon to talk about Git, distributed version control, and his quest to kill Word as a book authoring tool. Items mentioned in the show: Scott Chacon, Git evangelist, GitHubber, author of ProGit rsync is a software application for Unix and Windows systems which synchronizes files and directories […]
We spend a lot of time watching what’s hot on GitHub so you don’t have to. But even our crack team of open source fans can’t watch everything. Chances are, we’ll never cover much Ada or Nu. Fear not, Oscar Del Ben, of Rawler fame has made it easy to track trending repos for your favorite GitHub languages. GitHub Trends is a nice way to subscribe to feeds tracking the most watched and most forked projects broken out by day, week, and month.
Pair programming is like flying F-14s, and not just because our profession enjoys the same rock star status. Just like Maverick and Goose, one dev flies, and one is pretty much the Radar Intercept Officer, having a more dedicated view of threats including syntax errors and stray whitespace.
But just like there are two names on those Top Gun plaques, there are two devs in a pair, so there shouldn’t there be two names on the Git commit? After all “We happened to see a MiG 28 do a 4g negative dive.”
Going steady with your pair? Time to get hitched
Hitch from Rogelio J. Samour, Ruby hacker, bass player, Vim aficionado, and Solutions Barista at Hashrocket has created an easy way to assign multiple author attribution for your Git commits. Hitch creates a unique pair from Git users and even persists those pairs between terminal sessions. Pairs can even have their own fancy Gravatar for sites that support it (like GitHub).
Begin by installing the Ruby gem:
gem install hitch
RVM users will need to install the Hitch gem across all of their gemsets by running:
for x in $(rvm list strings); do rvm use $x@global && gem install hitch; done
Finally, Hitch needs some aliases in your Bash or Zsh profile:
hitch --setup >> ~/.bashrc
hitch --setup >> ~/.zshrc
You can then ‘hitch’ users together with
$ hitch pengwynn adamstac I don't know who pengwynn is. Do you want to add pengwynn to ~/.hitch_pairs? $ y What is pengwynn's full name? $ Wynn Netherland I don't know who adamstac is. $ y What is adamstac's full name? $ Adam Stacoviak What is the group email? e.g. firstname.lastname@example.org will become email@example.com $ firstname.lastname@example.org Adam Stacoviak and Wynn Netherland <email@example.com>
This ‘new’ email address still gets routed to the same ‘ping’ address in gmail, so no new email setup needed. Now we can set up this new email address on Gravatar:
There you have it. What tools do you use in your pair programming workflow? Let us know, we’d love to share them with our readers.
Check out the source on GitHub.
As much as I love the new GitHub pull requests, I like to stay in the terminal as much as possible. When I’m ready to start patching, hopping between the browser and the command line cuts into productivity.
To get started, install git-pulls via Rubygems:
gem install git-pulls
… and update the list of outstanding pull requests:
linkedin [ master: ✔ ] » git pulls update ~/Projects/linkedin Updating pengwynn/linkedin Checking for forks in need of fetching fetching camilleroux/linkedin Open Pull Requests for pengwynn/linkedin 30 01/22 0 Share API sabril:master 28 01/14 0 Support for Profile Recommendations Erol:master 26 12/09 0 add 'notes' field to Education camilleroux:master 23 11/17 0 Get more data from linkedin and bun finalist:master 22 10/29 0 Upgrade to 0.4.0 of oauth. zenom:master 21 10/19 0 Related connections ryanbrunner:related- 20 10/19 1 Two new topic branches with new fie ryanbrunner:recommen 16 09/03 0 bundler and load path madness fix, joshk:master 15 09/02 0 Added field public_profile_url troysteinbauer:maste linkedin [ master: ✔ ] » ~/Projects/linkedin
Whoa. Someone has some patching to do.
To view summary info for a pull request, use
git pulls show
linkedin [ master: ✔ ] » git pulls show 30 ~/Projects/linkedin Number : 30 Label : sabril:master Created : Sat Jan 22 12:03:23 -0600 2011 Votes : 0 Comments : 0 Title : Share API Body : add share function for new share API http://developer.linkedin.com/docs/DOC-1212 Usage: <pre> <code> client.share(:comment => 'new share API', :title => 'Linkedin Share API', :url => 'http://developer.linkedin.com/docs/DOC-1212', :image_url => 'http://images.bizjournals.com/travel/cityscapes/thumbs/sm_sanfrancisco.jpg') </code> </pre> Working on Resharing and Retrieving Share Info ------------ cmd: git diff HEAD...5772b1ee444e6f438ecc01c415236198e0783e00 lib/linked_in/client.rb | 22 +++++++++++++++++++++- test/client_test.rb | 4 ++++ test/fixtures/shares.xml | 12 ++++++++++++ 3 files changed, 37 insertions(+), 1 deletions(-)
You can also view the full details with
git pulls show <id> --full. There’s also support for merging pull requests with
git pull merge. If you need to comment on the pull request on the web site, you can open the the request online with
git pulls browse <id>.