Matthieu Moy <Matthieu.Moy@xxxxxxx> writes: > Junio C Hamano <gitster@xxxxxxxxx> writes: > >> Matthieu, is this something that forgetful people would find useful? > > Not sure. That's obviously an interesting feature, but adding two more > options to checkout (which is already a huge swiss-army knife) might > not be worth the trouble. > > And the issue with push/pop approaches is that I usually notice I have > to use pop after not having used push (i.e. I use "cd -" all the time, > but rarely "pushd"/"popd"). It is probably more common that you want to be able to switch back to the previous branch, than that you actually need a full stack. So a "git checkout --previous" could be enough. Or a set of aliases [alias] co = !"git symbolic-ref HEAD | sed -ne 's!refs/heads/!!p' > .git/LAST ; git checkout" pop = !"git co $(cat .git/LAST)" -- David Kågedal - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html