Skip to content
Snippets Groups Projects
Commit 61acd010 authored by nimrod's avatar nimrod
Browse files

Cleanup the git init* scripts.

The `git-Init` script created the repo on the cgit instance, but that's
not a thing anymore. Replace it with the `git-initial` script which just
creates a local repo and an initial empty commit.
parent 44a97451
No related branches found
No related tags found
No related merge requests found
......@@ -13,10 +13,8 @@ usage () {
[ "$#" = "1" ] || usage
reponame="$1"
# shellcheck disable=SC2029
ssh cgit.shore.co.il "git init --bare /srv/git/$reponame"
git clone "cgit.shore.co.il:/srv/git/$reponame"
git init "$reponame"
(
cd "$reponame"
git commit --allow-empty --message "Initial empty commit."
git push
)
#!/bin/sh
set -eu
die () {
echo "$@"
exit 1
}
usage () {
die "Usage: $0 repo_name"
}
[ "$#" = "1" ] || usage
reponame="$1"
# shellcheck disable=SC2029
git init "$reponame"
(
cd "$reponame"
git commit --allow-empty --message "Initial empty commit."
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment