Skip to content

Instantly share code, notes, and snippets.

View ariver's full-sized avatar

A. River ariver

  • .. Runs Thru I.T.
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mechanical-snail
mechanical-snail / .gitconfig
Last active October 1, 2015 05:28
gitconfig for managing multiple git identities
[user]
; No default user, lest you start a project as the wrong user.
; You have to specify your identity per-repository, using init-xxx or setuser-xxx.
; @@@@@ TODO: Should actually give an error when trying to commit before specifying an identity.
name = "@@@No user configured@@@"
email = "@@@No user configured@@@"
[alias]
;;;;;; init and user control
@kennethreitz
kennethreitz / sync.py
Created October 10, 2010 19:08
GitHub Syncer. Clones or Pulls all GitHub repos (including watched list).
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Kenneth Reitz's GitHub Syncer
This script uses the GitHub API to get a list of all forked, mirrored, public, and
private repos in your GitHub account. If the repo already exists locally, it will
update it via git-pull. Otherwise, it will properly clone the repo.
It will organize your repos into the following directory structure: