by tomxor on 6/2/2018, 1:26:59 PM
by wereHamster on 6/2/2018, 10:56:49 AM
Do you know about `git-sh-setup`? As in:
. "$(git --exec-path)/git-sh-setup"
require_clean_work_tree "bump" "Please commit or stash them."
https://git-scm.com/docs/git-sh-setupby TekMol on 6/2/2018, 10:42:43 AM
I'm confused. How is that different from 'git status'?
by colemickens on 6/2/2018, 1:11:21 PM
`git status --porcelain` and `if git diff-index --quiet HEAD -- ; then ...` might be lighter/easier ways (and include non-staged files [as well]).
Er, I guess that doesn't tell if you if you have un-pushed changes... but if your deployment process allows someone to deploy without pushing, your process is broken. Someone will deploy to Prod and forget to push their config changes, eventually.
by kbob on 6/3/2018, 9:05:37 PM
On a somewhat related note, I created check-git a few months ago. It scans a directory tree for unclean git repositories. Maybe someone will find it useful.
by kinow on 6/2/2018, 12:09:13 PM
Useful. Maven checks that for autpmated deployments. It delegates that part to SCM plugins as far as I know. Wonder if this one does the same as Maven. On mobile, but may check later (tis probably around here https://github.com/apache/maven-scm?files=1)
by wiz21c on 6/2/2018, 11:45:06 AM
In my job I've written a small script that compares JIRA entries to what lies into git. This I way I can spot things that were forgotten or put on the wrong branch...
by _ZeD_ on 6/2/2018, 12:56:52 PM
ok, seriously, is "using git push to do a deploy" a thing? WTF?
I wrote a git-tag based cli content deployment tool that does something like this as part of the deploy stage. It's intended for use with multiple users with a single remote, so before attempting to deploy anything it does the following to ensure no conflicts and that outdated content is never accidentally deployed:
I built this for a special type of content deployment for the company I work for but I think it's only been used internally so far (albeit successfully) - I made the tool as generalised as possible though as the core concept is quite re-usable, but I don't think I have described it's purpose clearly enough for the rest of the world in the readme:https://github.com/LearningScience/pegit