descriptionKitware Local Git Setup Scripts
homepage URLhttps://gitlab.kitware.com/utils/gitsetup
repository URLhttps://gitlab.kitware.com/utils/gitsetup.git
ownerstefan.naewe+rr@gmail.com
last changeMon, 23 Oct 2023 15:04:59 +0000 (23 11:04 -0400)
last refreshSat, 27 Apr 2024 05:56:56 +0000 (27 07:56 +0200)
content tags
add:
README
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.
shortlog
2023-10-23 Ben BoeckelMerge topic 'remove-spaces-wc' into setupsetup
2023-10-23 Cory Quammengit-bump: remove any spaces from `wc -l` command
2023-10-10 Ben BoeckelMerge topic 'gitlab-ssh-user-setting' into setup
2023-10-06 Ben Boeckelgitlab: use the `git@` user for SSH
2023-10-06 Ben BoeckelMerge topic 'git-version-check' into setup
2023-10-05 Ben Boeckelgit-bump: check for `rev-parse --path-format=`
2023-10-05 Ben Boeckelgit-bump: add a function to check the Git version
2023-10-05 Ben Boeckelgit-bump: fix ShellCheck lint
2023-10-03 Ben BoeckelMerge topic 'git-bump-ambiguity' into setup
2023-10-03 Ben BoeckelMerge topic 'remote-deref-insteadOf' into setup
2023-10-03 Ben Boeckelgit-bump: use exact names if possible
2023-10-03 Ben Boeckelsetup-{gerrit,gitlab,stage,upstream}: expand `insteadOf...
2023-10-03 Ben Boeckelgit-gitlab-push: remove unused variable
2023-09-13 Ben BoeckelMerge topic 'UpdateGitBump' into setup
2023-09-13 Nicolas VuailleGit bump should not fetch all
2023-09-12 Nicolas VuailleGit bump get actual git dir for worktree
...
heads
6 months ago setup
11 months ago hooks