Skip to content

Instantly share code, notes, and snippets.

@orta
Created March 21, 2016 09:14
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save orta/902d8e576a2b75afe2df to your computer and use it in GitHub Desktop.
Save orta/902d8e576a2b75afe2df 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