I'm having trouble setting up and then cloning a new repo on my gitolite server.
The same steps work on Github so I wonder is this is Gitolite?
Apologies in advance if this is all my brainfart.
Ultimately this results in:
warning: remote HEAD refers to nonexistent ref, unable to checkout.
I wonder is it has to do with me using "main" and not "master"?
# On the server...
$ bin/gitolite compile; bin/gitolite trigger POST_COMPILE
Initialized empty Git repository in /home/git/repositories/foobar.git/
# On the client
$ git init .
Initialized empty Git repository in /Users/XXX/foobar/.git/
$ git add .
$ git commit -m "First check-in"
[main (root-commit) 90908ba] First check-in
5 files changed, 285 insertions(+)
create mode 100644 file1
create mode 100644 file2
create mode 100644 file3
create mode 100755 file4
create mode 100644 file5
$ git push -u origin main
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 4.17 KiB | 4.17 MiB/s, done.
Total 8 (delta 0), reused 0 (delta 0), pack-reused 0
To xxxxx.com:foobar.git
* [new branch] main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.
# cd to a new folder
$ git clone git@xxxxx:foobar.git
Cloning into 'foobar'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (8/8), 4.17 KiB | 4.17 MiB/s, done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
# No files are pulled down
# If I do this, I get
$ git branch --set-upstream-to=origin/main main
fatal: branch 'main' does not exist
Thanks, Rod