Skip to content

Commit

Permalink
Merge pull request #9 from phdru/shell
Browse files Browse the repository at this point in the history
Remove unnecessary shell invocations
  • Loading branch information
joelparkerhenderson committed Jun 25, 2016
2 parents 7c4ce90 + 995c6b0 commit 40e8a4d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions gitalias.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
# 3400455 - foo
# 5dae0a0 - whatever
#
rbi = !"git rebase -i @{u}"
rbi = rebase -i @{u}

### reflog ###

Expand Down Expand Up @@ -269,7 +269,7 @@
diff-staged = diff --cached

# From https://gist.github.com/492227
head = !"git log -n1"
head = log -n1
heads = !"git log origin/master.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'"
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'"

Expand Down Expand Up @@ -422,8 +422,8 @@
### WORKFLOW ALIASES ###

# Stash aliases
save = !git stash save
pop = !git stash pop
save = stash save
pop = stash pop

# Stash snapshot - from http:https://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/
# Take a snapshot of your current working tree without removing changes.
Expand Down Expand Up @@ -553,10 +553,11 @@
### SHELL SCRIPTING ALIASES ###

# Get the current branch name
branch-name = !"git rev-parse --abbrev-ref HEAD"
branch-name = rev-parse --abbrev-ref HEAD

# Get the top level directory, regardless of what subdirectory we're in.
root = ! pwd
# root = ! pwd # this one is funny but slow
root = rev-parse --show-toplevel

# Execute shell scripts. Git always runs scripts in the top directory.
# For example "git exec pwd" will always show you the top directory.
Expand Down Expand Up @@ -604,7 +605,7 @@
# We also add the --window-memory limit of 1 gig, which helps protect
# us from a window that has very large objects such as binary blobs.
#
repacker = !git repack -a -d -f --depth=300 --window=300 --window-memory=1g
repacker = repack -a -d -f --depth=300 --window=300 --window-memory=1g

# Do everything we can to optimize the repository.
#
Expand Down

0 comments on commit 40e8a4d

Please sign in to comment.