Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    git commit --allow-empty -m "bump ci"
unless your pipeline does magic with trying to detect changed files


If this is to troubleshoot non-code related failures (perm issues, connection timed out, whatever influences success that doesn't require a code change) then surely the repo's history would benefit from one just clicking "Re-run Job", or its equivalent $(gh ...) invocation, right?


not necessarily, rerun job will most likely use the fully resolved dependency graph of your actions (or equivalent), a fresh run will re-resolve them (e.g. you pinned to @1 vs the specific version like @1.2.3 of a dep).

the history problem goes away if you always enforce squash merge...


I use Mercurial + hg-git like a weirdo. Not sure if Mercurial supports empty commits, I don't think it does.


I was curious and it certainly appears that you are right

  $ hg init
  $ hg commit -m"initial"
  nothing changed


Turns out it does, actually.

    hg ci -m "empty commit" --config ui.allowemptycommit=1

From https://stackoverflow.com/a/71428853. I tried it to confirm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: