No video

023 Introduction to Git Hooks

  Рет қаралды 15,690

Dan Gitschooldude

Dan Gitschooldude

Күн бұрын

Пікірлер: 17
@squid11160
@squid11160 5 жыл бұрын
Kudos for your excellent presentation and well mastered audio!
@programtesting190
@programtesting190 7 жыл бұрын
Very informative videos as always. If you have time can you please make a video on gitattributes ? That will really help. Thanks
@ruixue6955
@ruixue6955 3 жыл бұрын
6:00 example .git/hooks/prepare-commit-msg 7:49 example .git/hooks/pre-commit
@darrennew8211
@darrennew8211 4 жыл бұрын
My project has submit-blocking hooks, but it also checks for a particular bit of text in the commit message, so your "it won't build" blocker would be bypassed if the commit message included "DOESNT_BUILD" or something like that. It's a handy technique.
@DanGitschooldude
@DanGitschooldude 4 жыл бұрын
Very cool!
@swatisingh5644
@swatisingh5644 2 жыл бұрын
can u make video on how to share update.sample to other developer as u only mention but its not a details steps
@mijmijrm
@mijmijrm 5 жыл бұрын
" .. so let's go ahead and *_git_* started .." 8-)
@HansPeter-qg2vc
@HansPeter-qg2vc 7 жыл бұрын
Haha. I think this is the first time I heard someone say "You don't have to memorize this." about a link. ^^
@josephh836
@josephh836 4 жыл бұрын
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?
@DanGitschooldude
@DanGitschooldude 4 жыл бұрын
In general you shouldn't make a git repo owned by root for the reasons you've already described. Git only tracks the executable bit of the permissions for the user, so micromanaging permissions in the way you've described becomes a nightmare. It would be better to use a remote handling system like GitLab, GitHub, Bitbucket, etc. where permissions get managed by ssh keys. If that's not an option you could instead make a bare repo, but it would need sufficient visibility and permissions to accept pushes/fetches from all users which can be non-trivial.
@pranaybure2651
@pranaybure2651 7 жыл бұрын
Does Git provide any hooks for to work with >> git pull ? server-side hooks are for 'git push'.
@DanGitschooldude
@DanGitschooldude 7 жыл бұрын
Not that I'm aware of, but a hook for git pull wouldn't make much sense anyhow since a git pull is identical to a git fetch followed by a git merge. If you are after a pre-merge hook, no such thing seems to exist. You could use a prepare-commit-msg hook but that would only work in every case if you forced users to run git merge --no-ff, since fast-forward merges do not create a commit.
@pranaybure2651
@pranaybure2651 7 жыл бұрын
Could you post a video on working with server-side hooks viz. 'update' or 'pre-receive' hooks, I tried executing the hooks with GIT PUSH requests but no success. ------------------------------------------------------------------------------------------------------------ Tried below script with update hook. #!/usr/bin/env python import sys from subprocess import check_output old_commit = sys.argv[1] new_commit = sys.argv[2] #print '>>OLD-COMMIT:',old_commit, '>>NEW-COMMIT:',new_commit gitCmd = 'git rev-list ' + old_commit + '..' + new_commit commitDetails = check_output(gitCmd, shell=True).split(" ") print '>>>Commit-Details: ',commitDetails
@pranaybure2651
@pranaybure2651 7 жыл бұрын
My bad, update hook is invoked for "git-receive-pack", also pre-push hook only provides the name and URL of the remote through stdin.
@WilsonMar1
@WilsonMar1 7 жыл бұрын
Dan, do you have the githook Python code in GitHub somewhere?
@DanGitschooldude
@DanGitschooldude 7 жыл бұрын
Here ya go: github.com/gitschooldude/misc_scripts Thanks for your interest in the channel buddy!
@rakeshgaikwad7436
@rakeshgaikwad7436 4 жыл бұрын
your voice is made for RJ profil
024 Git aliases and git clean
19:06
Dan Gitschooldude
Рет қаралды 1,2 М.
032 Introduction to Git Subtrees
20:43
Dan Gitschooldude
Рет қаралды 39 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 162 МЛН
UNO!
00:18
БРУНО
Рет қаралды 5 МЛН
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 41 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 39 МЛН
Complete guide to GitHooks - Creating your own pre-commit hooks
29:33
Git hooks, practical uses (yes, even on Windows)
13:36
tygertec
Рет қаралды 61 М.
How to use Git Hooks
19:18
Kie Codes
Рет қаралды 16 М.
Git hooks, practical uses | git for beginners
17:48
Deekshith SN
Рет қаралды 7 М.
Git Tutorial: Fixing Common Mistakes and Undoing Bad Commits
21:31
Corey Schafer
Рет қаралды 382 М.
Complete GIT in 1 video
3:43:17
Hitesh Choudhary
Рет қаралды 77 М.
Lecture 6: Version Control (git) (2020)
1:25:00
Missing Semester
Рет қаралды 674 М.
Git Branches Tutorial
33:20
freeCodeCamp.org
Рет қаралды 243 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 162 МЛН