Skip to content

Instantly share code, notes, and snippets.

@skeeet
Forked from orta/fish_lazy_commits.sh
Created September 10, 2016 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skeeet/471c045e93464ddd717db32468171060 to your computer and use it in GitHub Desktop.
Save skeeet/471c045e93464ddd717db32468171060 to your computer and use it in GitHub Desktop.
Fish versions of my bash commands from Lazy Automation
# http://artsy.github.io/blog/2016/03/02/Lazily-Automation/
function git_branch_info
git branch ^/dev/null | grep \* | sed 's/* //'
end
function branch
git checkout master;
git pull upstream master;
git checkout -b $argv[1]
git config branch.$argv[1].description $argv[2]
end
function commit
set BRANCH (git_branch_info)
set INFO (git config branch.(echo $BRANCH).description)
git commit -m "[$INFO] $argv"
end
function context
set BRANCH (git_branch_info)
git config branch.(echo $BRANCH).description $argv[1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment