-
Notifications
You must be signed in to change notification settings - Fork 1
Chapter_8
Chris McIntosh edited this page Dec 3, 2019
·
1 revision
-
git config --systemwrites to/etc/gitconfig -
git config --globalwrites to~/.gitconfig -
git config --localwrites to.git/config -
git config --global commit.template <file>allows you to specify a commit log template -
git config --global help.autocorrect <n>will enable autocorrect and give you n tenths of seconds to cancel -
git config --global core.autocrlf inputwill fixcrlfon commit
-
.gitattributesfile allows you to set attributes about file types- You can also set custom attributes about those files, for instance set up a ms word diff type that runs a custom script to allow you to diff word files
- You can write Smudge filters
- Or Clean filters to do keyword expansion like CVS?
-
export-ignorewill ignore said files during agit archivecommand
-
pre-commitruns first, before even a message is typed-
git commit --no-verifyskips this hook
-
-
prepare-commit-msgruns after the default message is created and allows you to alter it -
commit-msgallows you to validate the commit message, to enforce that whatever you want is in every commit message -
post-commitruns after the commit and doesn't have any parameters, often used for notification - Email workflow hooks exist but aren't used much these days
-
pre-rebaseallows you to do some validation before a rebase, such as prevent rebase to commits that have been pushed- Is that what enables the force push/rebase stuff?
-
post-rewriteruns when you are fixing history -
post-checkoutruns after checkout, is this howgit-lfsgrabs files? -
post-mergeafter a merge pre-push-
pre-auto-gcbefore a garbage collection
-
pre-receiveruns when handling a push from a client -
updateruns once per branch, similar to the previous one, butpre-receiveruns once per push no matter how many branches -
post-receiveruns after the entire process is done