Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [user]
- name = JT
- email = hello@jtolds.com
- [ui]
- color = auto
- [color]
- ui = auto
- [rerere]
- enabled = true
- [alias]
- # thanks to zach wily
- push-change = "!bash -c ' \
- local_ref=$(git symbolic-ref HEAD); \
- local_name=${local_ref##refs/heads/}; \
- remote=$(git config branch.\"$local_name\".remote || echo origin); \
- remote_ref=$(git config branch.\"$local_name\".merge); \
- remote_name=${remote_ref##refs/heads/}; \
- remote_review_ref=\"refs/for/$remote_name\"; \
- r=\"\"; \
- if [[ $0 != \"\" && $0 != \"bash\" ]]; then r=\"--reviewer=$0\"; fi; \
- if [[ $1 != \"\" ]]; then r=\"$r --reviewer=$1\"; fi; \
- if [[ $2 != \"\" ]]; then r=\"$r --reviewer=$2\"; fi; \
- if [[ $3 != \"\" ]]; then r=\"$r --reviewer=$3\"; fi; \
- if [[ $4 != \"\" ]]; then r=\"$r --reviewer=$4\"; fi; \
- git push --receive-pack=\"gerrit receive-pack $r\" $remote HEAD:$remote_review_ref'"
- # thanks to cody cutrer
- cherry-pick-merge = "!bash -c 'git cherry-pick -n -m 1 $0 && \
- git log -1 --pretty=%P $0 | cut -b 42- > .git/MERGE_HEAD && \
- git commit -v'"
- resolve-ref = log -1 --pretty=format:%H
- changeset = "!bash -c ' \
- git fetch $(git config remote.$(git this-remote).url) \
- refs/changes/${0: -2}/$0/$1; \
- git resolve-ref FETCH_HEAD'"
- this-remote = "!bash -c ' \
- local_ref=$(git symbolic-ref HEAD); \
- local_name=${local_ref##refs/heads/}; \
- echo $(git config branch.\"#local_name\".remote || echo origin)'"
- remote-ref = "!bash -c ' \
- local_ref=$(git symbolic-ref HEAD); \
- local_name=${local_ref##refs/heads/}; \
- remote=$(git config branch.\"#local_name\".remote || echo origin); \
- remote_ref=$(git config branch.\"$local_name\".merge); \
- remote_name=${remote_ref##refs/heads/}; \
- echo remotes/$remote/$remote_name'"
- rebase-recent = !git rebase -i $(git merge-base HEAD $(git remote-ref))
- # something is screwed up somewhere in my gerrit/git config. haven't
- # figured it out yet.
- fix-author = !git filter-branch -f --commit-filter '"\
- "if [ \"$GIT_AUTHOR_NAME\" = \"jt@instructure.com\" ] || [ \"$GIT_AUTHOR_NAME\" = \"hello@jtolds.com\" ] || [ \"$GIT_AUTHOR_EMAIL\" = \"hello@jtolds.com\" ]";" then "\
- "GIT_AUTHOR_NAME=\"JT\"";" "\
- "GIT_AUTHOR_EMAIL=\"jt@instructure.com\"";" "\
- "fi";" git commit-tree \"$@\"' $(git remote-ref)..HEAD
- fix-committer = !git filter-branch -f --commit-filter '"\
- "if [ \"$GIT_COMMITTER_NAME\" = \"jt@instructure.com\" ] || [ \"$GIT_COMMITTER_NAME\" = \"hello@jtolds.com\" ] || [ \"$GIT_COMMITTER_EMAIL\" = \"hello@jtolds.com\" ]";" then "\
- "GIT_COMMITTER_NAME=\"JT\"";" "\
- "GIT_COMMITTER_EMAIL=\"jt@instructure.com\"";" "\
- "fi";" git commit-tree \"$@\"' $(git remote-ref)..HEAD
- lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
- [giggle]
- main-window-maximized = false
- main-window-geometry = 700x550+502+188
- file-view-vpane-position = 280
- main-window-view = FileView
- [github]
- user = jtolds
- token = 1c2aa26005ee0ed044ca787541adb748
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement