File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ if( $GIT_GLOBAL -eq "--global" ) {
17
17
echo " ******** Creating local ../.git/config file using git config commands"
18
18
}
19
19
20
-
21
- # TODO: Create separate shell file to define git aliases for repo.
22
- # Verify settings:
20
+ # Verify settings:
23
21
git config $GIT_GLOBAL core.filemode false
24
22
25
23
# Using variables built into PowerShell: See https://help.github.com/articles/dealing-with-line-endings/
@@ -48,6 +46,9 @@ if ( $IsOSX -eq $True){
48
46
if ( $IsOSX -eq $True ){
49
47
git config $GIT_GLOBAL core.editor " ~/Sublime\ Text\ 3/sublime_text -w"
50
48
# git config $GIT_GLOBAL core.editor=subl -w
49
+
50
+ # On Unix systems, ignore ^M symbols created by Windows:
51
+ git config core.whitespace cr- at- eol
51
52
}
52
53
53
54
# Allow all Git commands to use colored output, if possible:
Original file line number Diff line number Diff line change
1
+ # git-hooks-install.ps1
2
+ # by wilsonmar at gmail.com
3
+ # After the repo is cloned, this PowerShell script copies
4
+ # scripts in the repo's hooks folder into the .git/hooks
5
+ # and sets permissions.
6
+
7
+ echo " Remove *.sample files in .git/hooks ..."
8
+ Remove-Item .git/ hooks/* .sample
9
+
10
+ echo " Copy hooks/git-commit into .git/hooks ..."
11
+
12
+ Copy-Item hooks/ prepare- commit- msg .git/ hooks
13
+ # Copy-Item hooks/git-commit .git/hooks
14
+ Copy-Item hooks/ git- push .git/ hooks
15
+ Copy-Item hooks/ git- rebase .git/ hooks
16
+
17
+ if ( $IsWindows -eq $True ) {
18
+ # icacls
19
+ }
20
+ if ( $IsOSX -eq $True ){
21
+ chmod + x .git/ hooks/ prepare- commit- msg
22
+ # chmod +x .git/hooks/git-commit
23
+ chmod + x .git/ hooks/ git- push
24
+ chmod + x .git/ hooks/ git- rebase
25
+ }
26
+
27
+ ls .git/ hooks
28
+
29
+ # echo "Done with status $? (0=OK)."
You can’t perform that action at this time.
0 commit comments