Skip to content

Instantly share code, notes, and snippets.

View ordovician's full-sized avatar

Erik Engheim ordovician

View GitHub Profile
@ordovician
ordovician / fish_prompt.fish
Last active October 3, 2018 23:22
[fish current directory] Set the prompt in the fish shell to a minimalistic "currentdir $ " Where currendir is the last directory in current working directory
function fish_prompt
echo -n '['
set_color $fish_color_cwd
echo -n (basename $PWD)
set_color normal
echo -n '] $ '
end
@ordovician
ordovician / git-change-history.rb
Created November 5, 2012 19:24
Change git history without modifying the tree blobs pointed to by commits
#! /usr/bin/env ruby
if ARGV.empty?
puts "Usage: git-change-history base [new-branch-name]"
puts " a list of SHA-1 for commits are given on STDIN. These are commits are added onto base"
puts "Example:"
puts " git log --pretty=\"%H\" master | git-change-history.rb base mynewbranch"
puts ""
puts "Use 'git log --pretty=\"%H %s\"' to test if you have the right SHA-1 commit hashes listed"
exit