Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
2ef5c0c8
Commit
2ef5c0c8
authored
10 years ago
by
Jeff Fein-Worton
Browse files
Options
Downloads
Patches
Plain Diff
Improved post-init-add-origin hook
Added better help text Added error message if $GITURL unset
parent
0be68e89
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/sample_hooks/post-init-add-origin
+14
-2
14 additions, 2 deletions
doc/sample_hooks/post-init-add-origin
with
14 additions
and
2 deletions
doc/sample_hooks/post-init-add-origin
+
14
−
2
View file @
2ef5c0c8
#!/bin/sh
#!/bin/sh
# This adds a remote origin at $GITURL/dotfiles/$VCSH_DIRECTORY
# This adds a remote origin at $GITURL/dotfiles/$VCSH_DIRECTORY which
# Assumes $GITURL is set to the base of your remote repos.
# is helpful for creating new dotfile repositories that you plan to
# store on (e.g.) Github.
#
# You must set $GITURL in order to use this hook. For example, add the
# following to your .bashrc (or equivalent for your shell), replacing
# YOURUSERNAME with your github username:
#
# export GITURL="git@github.com:YOURUSERNAME"
if
[
-z
$GITURL
]
;
then
echo
"
\$
GITURL is not set; please see post-init-add-origin hook"
exit
1
;
fi
vcsh
$VCSH_DIRECTORY
remote add origin
$GITURL
/dotfiles/
$VCSH_DIRECTORY
vcsh
$VCSH_DIRECTORY
remote add origin
$GITURL
/dotfiles/
$VCSH_DIRECTORY
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment