Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Martin Willers
KWSys
Commits
2f79eb8e
Commit
2f79eb8e
authored
13 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
Add README instructions and sample configuration
parent
1aeea926
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README
+87
-0
87 additions, 0 deletions
README
config.sample
+22
-0
22 additions, 0 deletions
config.sample
with
109 additions
and
0 deletions
README
0 → 100644
+
87
−
0
View file @
2f79eb8e
Kitware Local Git Setup Scripts
Introduction
------------
This is a collection of local Git development setup scripts meant for
inclusion in project source trees to aid their development workflow.
Project-specific information needed by the scripts may be configured
in a "config" file added next to them in the project.
Import
------
A project may import these scripts into their source tree by
initializing a subtree merge. Bring up a Git prompt and set the
current working directory inside a clone of the target project.
Fetch the "setup" branch from the GitSetup repository:
$ git fetch ../GitSetup setup:setup
Prepare to merge the branch but place the content in a subdirectory.
Any prefix (with trailing '/') may be chosen so long as it is used
consistently within a project through the rest of these instructions:
$ git merge -s ours --no-commit setup
$ git read-tree -u --prefix=Utilities/GitSetup/ setup
Commit the merge with an informative message:
$ git commit
------------------------------------------------------------------------
Merge branch 'setup'
Add Utilities/GitSetup/ directory using subtree merge from
the general GitSetup repository "setup" branch.
------------------------------------------------------------------------
Optionally add to the project ".gitattributes" file the line
/Utilities/GitSetup export-ignore
to exclude the GitSetup directory from inclusion by "git archive"
since it does not make sense in source tarballs.
Configuration
-------------
Read the "Project configuration instructions" comment in each script.
Add a "config" file next to the scripts with desired configuration
(optionally copy and modify "config.sample"). For example, to
configure the "setup-hooks" script:
$ git config -f Utilities/GitSetup/config hooks.url "$url"
where "$url" is the project repository publishing the "hooks" branch.
When finished, add and commit the configuration file:
$ git add Utilities/GitSetup/config
$ git commit
Update
------
A project may update these scripts from the GitSetup repository.
Bring up a Git prompt and set the current working directory inside a
clone of the target project. Fetch the "setup" branch from the
GitSetup repository:
$ git fetch ../GitSetup setup:setup
Merge the "setup" branch into the subtree:
$ git merge -X subtree=Utilities/GitSetup setup
where "Utilities/GitSetup" is the same prefix used during the import
setup, but without a trailing '/'.
License
-------
Distributed under the Apache License 2.0.
See LICENSE and NOTICE for details.
This diff is collapsed.
Click to expand it.
config.sample
0 → 100644
+
22
−
0
View file @
2f79eb8e
# Kitware Local Git Setup Scripts - Sample Project Configuration
#
# Copy to "config" and edit as necessary.
[hooks]
url = http://public.kitware.com/GitSetup.git
#branch = hooks
[ssh]
host = public.kitware.com
key = id_git_public
request-url = https://www.kitware.com/Admin/SendPassword.cgi
[stage]
#url = git://public.kitware.com/stage/Project.git
#pushurl = git@public.kitware.com:stage/Project.git
[gerrit]
#project = Project
site = http://review.source.kitware.com
# pushurl placeholder "$username" is literal
pushurl = $username@review.source.kitware.com:Project
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