Skip to content

Commit 8e8f888

Browse files
brew_init
1 parent 7ab297f commit 8e8f888

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

rc/alias.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ alias gpshm="git push origin master"
4545
alias gpll="git pull origin $@"
4646
alias gpllm="git pull origin master"
4747
alias gcom="git checkout master"
48+
# undo local commits
49+
# https://stackoverflow.com/a/927386/775184
50+
alias gulast="git reset HEAD~"
51+
# revert local changes
52+
alias greset="git reset --hard"
53+
54+
alias grestore="git restore ."
55+
4856

4957

5058
# Trim new lines and copy to clipboard

tools/brew_init

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
brewPath="/usr/local/bin/brew"
3+
4+
if [ "$(uname)" = "Linux" ]; then
5+
brewPath="/home/linuxbrew/.linuxbrew/bin"
6+
fi
7+
8+
if [ ! -x "$(command -v brew)" ]; then
9+
if [ -d "${brewPath}" ]; then
10+
echo "adding ${brewPath} to PATH ..."
11+
12+
export PATH="${brewLinuxPath}:${PATH}"
13+
fi
14+
fi

0 commit comments

Comments
 (0)