-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ein Verne <einverne@gmail.com>
- Loading branch information
Showing
19 changed files
with
330 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# | ||
# A very slightly quicker way to credit an author on the latest commit. | ||
# | ||
# $1 - The full name of the author. | ||
# $2 - The email address of the author. | ||
# | ||
# Examples | ||
# | ||
# git credit "Zach Holman" zach@example.com | ||
# | ||
|
||
git commit --amend --author "$1 <$2>" -C HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
# | ||
# Delete all local branches that have been merged into HEAD. Stolen from | ||
# our favorite @tekkub: | ||
# | ||
# https://plus.google.com/115587336092124934674/posts/dXsagsvLakJ | ||
|
||
git branch -d `git branch --merged | grep -v '^*' | grep -v 'master' | tr -d '\n'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
# | ||
# Open new, unstaged files in your $EDITOR. | ||
# | ||
# This is nice to have when you run a command line generator which generates a | ||
# file or three in your working directory, and you know you want to immediately | ||
# edit them in your editor next. Why waste time clicking around like some sort | ||
# of plebian when you can just run another command? | ||
|
||
$EDITOR $(git ls-files --others --exclude-standard) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# | ||
# Nukes a branch locally and on the origin remote. | ||
# | ||
# $1 - Branch name. | ||
# | ||
# Examples | ||
# | ||
# git nuke add-git-nuke | ||
|
||
git branch -D $1 | ||
git push origin :$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env ruby | ||
# Usage: gitio URL [CODE] | ||
# | ||
# Turns a github.com URL | ||
# into a git.io URL | ||
# | ||
# Created by @defunkt: | ||
# https://gist.github.com/1209316 | ||
# | ||
# Copies the git.io URL to your clipboard. | ||
|
||
url = ARGV[0] | ||
code = ARGV[1] | ||
|
||
if url !~ /^(https?:\/\/)?(gist\.)?github.com/ | ||
abort "* github.com URLs only" | ||
end | ||
|
||
if url !~ /^http/ | ||
url = "https://#{url}" | ||
end | ||
|
||
if code | ||
code = "-F code=#{code}" | ||
end | ||
|
||
output = `curl -i https://git.io -F 'url=#{url}' #{code} 2> /dev/null` | ||
if output =~ /Location: (.+)\n?/ | ||
puts $1 | ||
`echo #$1 | pbcopy` | ||
else | ||
puts output | ||
end |
Oops, something went wrong.