FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
llfio/install_dev_githooks.sh at develop · ned14/llfio · GitHub
ned14
/
llfio
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
57
Star
1.1k
Code
Issues
23
Pull requests
6
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
llfio
/
install_dev_githooks.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
11 lines (11 loc) · 721 Bytes
Breadcrumbs
llfio
/
install_dev_githooks.sh
Copy path
File metadata and controls
executable file
·
11 lines (11 loc) · 721 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
#!
/bin/sh
echo
Installing post-merge hook which recursively forces all
echo
submodules to latest commit after every git pull
cat
<<
EOT
>> .git/hooks/post-merge
#!/bin/sh
git submodule foreach --recursive 'branch=
\$
(git config -f
\$
toplevel/.gitmodules submodule.
\$
name.branch); [ \"
\$
branch\" = \"\" ] && branch=master; git checkout
\$
branch; git merge origin/
\$
branch;'
EOT
chmod +x .git/hooks/post-merge
echo
Installing custom
'
git pull-all
'
command
for
recursively
echo
forcing all submodules to latest commit
git config alias.pull-all
"
submodule foreach --recursive 'branch=
\$
(git config -f
\$
toplevel/.gitmodules submodule.
\$
name.branch); [
\"\$
branch
\"
=
\"\"
] && branch=master; git checkout
\$
branch; git pull;'
"
Back
|
FazBrowse Home
|
New Git URL