Created
August 23, 2016 18:00
-
-
Save patrickcousins/07c4ba1b695a4c672a136fb2cce8f47f to your computer and use it in GitHub Desktop.
Git config stuff
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
[color] | |
ui = auto | |
[user] | |
name = zzzz | |
email = [email protected] | |
[alias] | |
last = log -1 HEAD | |
co = checkout | |
ci = commit | |
cm = commit | |
br = branch | |
bi = bisect | |
unstage = reset HEAD -- | |
ap = add -p | |
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit | |
lgg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --graph | |
st = status | |
cp = cherry-pick | |
ap = add -p | |
[core] | |
editor = subl -n -w | |
excludesfile = /Users/zzz/.gitignore_global | |
[push] | |
default = simple | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true |
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
alias push="~/bin/push" | |
alias pr="~/bin/pullreq" | |
alias cleanbr="git branch --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d" | |
alias pull="git pull" | |
alias pushtags="git push --tags" | |
alias grhh="git reset head --hard" | |
alias gs="git status" |
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
#!/bin/bash | |
#for bitbucket can easily be modified for github | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
git push -u origin ${CURRENT_BRANCH} | |
repository="zzz" | |
company="zzz" | |
branchUrl="https://bitbucket.org/${company}/${repository}/pull-requests/new?source=${CURRENT_BRANCH}&t=1" | |
echo "Opening: ${branchUrl}" | |
open $branchUrl | |
git checkout develop |
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
#!/bin/bash | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
git push -u origin ${CURRENT_BRANCH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment