Это видео недоступно.
Сожалеем об этом.
Git hooks, practical uses (yes, even on Windows)
HTML-код
- Опубликовано: 5 апр 2018
- Git hooks: What are they? What do they do for you? Dive right in with this relaxing overview and practical demonstration of the power of Git hooks! (For an outline click "SHOW MORE")
What are Git hooks?
Git hooks allow you to run your own scripts whenever important events occur in the Git life-cycle, like committing, merging, and pushing. That means the only limit to Git hooks is your imagination (and the patience of your coworkers).
Index of contents
* 00:07: Overview of Git hooks
* 00:46: The "nitty gritty" of git hooks
* 01:18: Default sample hooks
* 01:41: Location of Git's repo template
* 02:08: Pre vs Post hooks
* 02:52: zero == hero
* 03:36: Local vs server side hooks
* 03:49: Enabling a hook
* 04:22: Gotchas (pitfalls)
- 04:24: Surprises!
- 04:45: Hooks not source controlled
- 05:42: bypass a hook with --no-verify
- 05:59: silent failure mode
* 06:20: Getting practical with git hooks
* 06:27: Verify name/email with pre-commit hook
* 07:57: Ensure no words match a "blacklist"
* 08:16: Live demo of name/email pre-commit hook
* 09:43: pre-commit vs pre-push hooks
* 10:32: Your choice of scripting language (#! shebang!)
* 11:11: Get hooks working on Windows
* 12:16: Set hooks dir with core.hookspath
Learn more and join the git hooks conversation at tygertec.com/g...
* Twitter: / tygertec
* Site: tygertec.com
Thanks for watching. Subscribe now and enjoy relaxing tech tutorials.
I was watching this video on a chrome profile without gmail login and this video helped me so I logged and liked this video and subscribed
Thank you so much for a clear explanation and great visualization of the topic. :)
Nice video, Point to Point & clear explanation, keep it up.
Wow, very descriptive tutorial. Many thanks. Sad that you stop creating new content =\
Gotcha your youtube channel by git hook. Good description ^^
Very well explained,
Thanks Ty
It's an Awesome explanation.
Very good explanation. Keep 'em coming!
Very cool walk through. thank you!
To the point, much appreciated :)
superb tutorial
Thanks for informative explanations.
i have problem that i couldn't find out it.
i have created a project by root in my UNIX system. then i make a lot of change on that. using git i give accessibility to a non root user "for example Alex" to pull and make his change on the project. but when he wanna write the change, permission denied massage is appeared and he can not write his change on the file. i checked the file permission and i saw the permission of all file and folder in project directory and sub directories change to "rw-r--x--". i wanna keep project file and folder permission on "chmod 666" and prevent change it through deployment by git. what should i do?
8:50 is gst alias of git status by default! That's great. I didn't know that
That was a function in my PowerShell profile:
function gst { git status $args }
thanks dude, this really clarified a lot. too bad you only have 3 videos
thank you s much
This is a great video. Thanks
Great explanation!!! Thanks :D
Sir can I invoke yarn target like yarn lint from here?
Thanks Tyger!
thanks @tygertec : Thanks but this global setting for core.hookspath will only be applicable incase i am using gitbash. What if i use any other tool like github desktop.
my commit-msg hook is writting in shell which is not recoginsed by tools like github desktop or Tortoise git ..
Still relevant. Still best explanation of git hooks. Only needed this to make it work w/ PowerShell: www.tygertec.com/git-hooks-practical-uses-windows/
Great stuff! Is it possible to enforce branch names created locally with a git branch '/ or same with git checkout -b? What event would that be keyed to?
Thanks. :) As far as I know, what you describe isn't currently possible. Here's a full list of the available hooks:
www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks
I've never tried this, but I suppose you could use post-checkout to display a message or something indicating that the branch name was non-standard, but it wouldn't prevent creating the branch in the first place.
@@tygertec1 teste
can i get the full code over here
Windows doesn't have /bin/sh LOL
Can hear your lips smacking ... good vid, but new mic please.