You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are no commits, then the squash fails because rc cannot find a previous commit from origin. I'm not sure how to handle this in an elegant way considering it will only happen once on new repos.
Activity
pgr0ss commentedon Sep 26, 2011
If there are no commits, then the squash fails because
rccannot find a previous commit from origin. I'm not sure how to handle this in an elegant way considering it will only happen once on new repos.phinze commentedon Sep 26, 2011
this will yield 0 on a new repo, and > 1 if there are commits:
it's existed in git since 2006 - so should be pretty reliably available
https://github.com/gitster/git/blob/c74320872b445104fe5c265e60785d9d26d94cc5/builtin-count.c