Skip to content
Snippets Groups Projects
Commit 1df6ec26 authored by nimrod's avatar nimrod
Browse files

- Added last-commit Git alias to last "true" commit (ignore fixups,

squashes and merges).
- Modify fixup and add squash Git aliases to be fully automated (no need
to enter the commit intended).
parent 78703bdf
Branches
No related tags found
No related merge requests found
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
empty-commit = commit --allow-empty empty-commit = commit --allow-empty
exec = "!exec " exec = "!exec "
ff = merge --no-edit --ff-only master ff = merge --no-edit --ff-only master
fixup = commit --fixup fixup = !git commit --fixup $(git last-commit)
forget = reset HEAD^ forget = reset HEAD^
last-commit = "!git log --no-merges --abbrev-commit --format=\"%h %s\" | awk '{if ($2 != \"fixup!\" && $2 != \"squash!\") {print $1; exit}}'"
merg = merge --no-edit merg = merge --no-edit
posh = push --set-upstream origin HEAD posh = push --set-upstream origin HEAD
pul = pull --progress pul = pull --progress
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
root = rev-parse --show-toplevel root = rev-parse --show-toplevel
serve-git = daemon --reuseaddr --verbose --base-path=. --export-all ./.git serve-git = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
serve-http = !git update-server-info && cd .git && python -m SimpleHTTPServer serve-http = !git update-server-info && cd .git && python -m SimpleHTTPServer
squash = !git commit --squash $(git last-commit)
staash = stash --all staash = stash --all
stat = status --short --branch stat = status --short --branch
tag-version = !git tag --annotate --force --message "v$(cat VERSION)" "v$(cat VERSION)" tag-version = !git tag --annotate --force --message "v$(cat VERSION)" "v$(cat VERSION)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment