git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-push error handling

From
NKNeal Kreitzinger <nkreitzinger@gmail.com>
Date
Jun 20, 2012, 19:43 UTC
Message-ID
<jrt949$o3g$1@dough.gmane.org>

Does git push always return an error to "if [ $? -ne 0 ]" when the push fails? Is this sufficient to verify your git-push worked? I'm being asked to advise on commands to 'verify the canonical repo is in good working order' immediately before a push and immediately after a push (for total automation). I'm used to doing pushes manually. I think git-push itself will tell you if there's a problem, and there's no need for 'before' and 'after' checks. Correct?

Very Limited Scope of Context: We don't do anything special in the push. We are just fast-forwarding the master branch and there is only one branch (master). (The powers-that-be are doing their own change control (ie, file locking) and only care to copy files to the worktree of master, git-add, git-commit, and git-push to canonical.) They have created a change control menu that only uses git to 'check out' source and to 'commit source' automatically via scripts. They are doing the merges manually and not using git for that so there is no 'merging of master' going on as far as git is concerned. They're basically using git to replace cvs in their legacy change control so they don't wish to use any git functionality like branches, merges, etc, at this time. I think they are just using git checkout, git add, git commit, to say they have put the changes into a 'change control repository'.

v/r, neal

Next: Jeff King
Message 1 of 2 in “git-push error handling”
  1. Neal KreitzingerJun 20, 2012
  2. Jeff KingJun 21, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.