checking for 'clean' bare repo before push

From: Neal Kreitzinger <hidden>
Date: 2016-06-15 22:54:10

I'm being asked to provide commands to check for 'clean' state of bare 
repo before and after a git-push.  This request is based on the notion 
of checking for a clean worktree (git status) before a checkout, merge, 
etc on a non-bare repo and checking the worktree state after such 
operations.

Context:
Since the bare repo and non-bare clone repos in question only have 
branch master, and deny-non-ff is set for the bare repo, I don't think 
there are checks to be done before and after git-push in our case. 
git-gc and git-fsck could be possible, but don't seem normative for 
every single push.  git-gc has auto configurations, and git fsck is 
expensive.  It seems like routine git-gc obviates the need for git fsck.

Am I correct on this?

v/r,
neal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help