Skip to content

Commit

Permalink
add git utility command alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jayswoo committed Mar 30, 2018
1 parent 4d0b40c commit 6a47fd4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .synergy.conf

This file was deleted.

3 changes: 3 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ alias "lst=lsof -iTCP -sTCP:LISTEN -n -P"
alias cpwd="pwd | tr -d '\n' | pbcopy"

eval "$(thefuck --alias)"

alias "cleanBranch=git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d"
alias "revertGit=~/Utils/scripts/revertGit.sh"
10 changes: 10 additions & 0 deletions revertGit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

tag=${1}

git checkout ${tag}
git diff master > /Users/jays/Utils/scripts/temp/diff.patch
git checkout master
cat /Users/jays/Utils/scripts/temp/diff.patch | git apply
git commit -am "Rolled back to version ${tag}"
#git push origin master
3 changes: 3 additions & 0 deletions setupConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ cp .zshrc ~/.zshrc
defaults write NSGlobalDomain KeyRepeat -float 1.8
defaults write NSGlobalDomain InitialKeyRepeat -int 13

mkdir -p ~/Utils/script

cp ./revertGit.sh ~/Utils/script/
source ~/.bashrc

0 comments on commit 6a47fd4

Please sign in to comment.