From: Lee Griffiths Date: Wed, 08 Jul 2009 17:36:30 GMT Subject: Re: Checking for fast-forward Message-ID: In-Reply-To: <4A530594.20100@drmicha.warpmail.net> Thanks for the answers :) After seeing that git push skips the packing (and potentially other things) when doing a dry run, and given that: git push --dry-run takes 1.5s on average and that: git fetch git rev-list master..remotes/origin/master OR git ls-remote origin refs/remotes/origin/master take 4s on average, I think I'll stick with the dry-run & checking for exception method. Thanks though :) 2009/7/7 Michael J Gruber : > If $(git rev-list bar..remotes/origin/foo) is empty then the branch foo > in the remote repo can be fast-forwarded to bar.