diff --git a/.gitconfig b/.gitconfig
index a92b3b880b10f1cc4fb370109896199e247e88a2..53eb0d06a99dc7d44f21e971889f46795287b8f2 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -9,7 +9,7 @@
     empty-commit = commit --allow-empty
 	exec = "!exec "
     ff = merge --no-edit --ff-only master
-    fixup = !git commit --fixup $(git last-commit)
+    fixup = !cd "${GIT_PREFIX:-}" && git commit --fixup $(git last-commit)
     forget = reset HEAD^
     merg = merge --no-edit
     posh = push --set-upstream origin HEAD
@@ -20,7 +20,7 @@
     root = rev-parse --show-toplevel
     serve-git = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
     serve-http = !git update-server-info && cd .git && python -m SimpleHTTPServer
-    squash = !git commit --squash $(git last-commit)
+    squash = !cd "${GIT_PREFIX:-}" && git commit --squash $(git last-commit)
     staash = stash --all
     stat = status --short --branch
     tag-version = !git tag --annotate --force --message "v$(cat VERSION)" "v$(cat VERSION)"