Skip to content

Instantly share code, notes, and snippets.

View wadehammes's full-sized avatar

Wade Hammes wadehammes

View GitHub Profile
@wadehammes
wadehammes / README.md
Last active October 28, 2026 10:37
st: Graphite-style (gt) wrapper for GitHub Stacks CLI (gh stack) — create/update/prune/checkout + cheatsheet

st — Graphite-style wrapper for gh stack

st is a zsh function that wraps the GitHub Stacks CLI (gh stack) with familiar Graphite (gt) command names. Use it to create stacked branches, amend commits, and restack upstack without remembering the full gh stack surface area.

Setup

Prerequisites

  • GitHub CLI (gh) v2.0+, authenticated
  • gh stack extension v0.1.1+ (v0.2.0+ for git worktrees, v0.2.1+ for SSH Host aliases and api_host in hosts.yml): gh extension install github/gh-stack
@timdorr
timdorr / .gitconfig
Created January 26, 2016 15:57
.gitconfig aliases
[alias]
st = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
up = !git fetch origin && git rebase origin/master
mup = !git fetch origin && git merge origin/master
done = "!git checkout master && git pull && git fetch -p && git branch --merged | grep -Pv '\\*|master' | xargs -n 1 git branch -d"
@webercoder
webercoder / wp-author-import-auto-select.js
Created June 4, 2012 20:33
Auto-select authors for posts during WordPress import. They must already be assigned to the project. Enable jQuery in a plugin or functions.php, and paste this in the browser console.
(function($){
$('#authors li').each(function(key, value) {
var name = $(this).children('strong').first().html();
var re = /\s\([^\)]+\)/gi;
name = name.replace(re, '');
$(this).find('select').first().children('option').each(function(){
if ($(this).html() == name) {
console.log('Comparing ' + $(this).html() + ' to ' + name + ".\n");
$(this).attr('selected', 'selected');