This file contains hidden or 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
# Requires bash, history, tail, cut, echo, and sed (if you have bash you probably | |
# don't need to install anything). | |
# Takes a alias name and gets the last command from the history. Makes it an | |
# alias and puts it in .bash_aliases. Be sure to source .bash_aliases in .bashrc | |
# or this wont work. | |
makeAlias() | |
{ | |
if [ $# -eq 0 ]; then | |
echo "No arguments supplied. You need to pass an alias name" |
This file contains hidden or 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
# 1) Pick a branch ($1) | |
# 2) stash | |
# 3) checkout | |
# 4) updated files from last commit | |
# 5) commit and push if new edits made | |
# 6) back to previous branch | |
# 7) pop stash | |
g () { | |
cd $(git rev-parse --show-toplevel) |