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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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
)

Documents/bin/git-initial

deleted100755 → 0
+0 −20
Original line number Diff line number Diff line
#!/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."
)