Actually, I think Jakub's approach is better: you'd be better off doing
this as
alias git-1="git --git-dir=.git-1"
alias git-2="git --git-dir=.git-2"
and now you should be able to just do
git-1 diff
(or any other git command) and
git-2 diff
and can happily share the same directory and mix git commands without
changing an environment variable all the time.
That would still be insane, but it wouldn't likely be _quite_ as confusing
(or error-prone in case you forgot to switch the variable).
Linus
PS. I'd still _not_ suggest doing this. It should _work_, but I mean -
really..
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html