Subject: RE: git client enhancement request

From: <[email-masked]>
Date: Mon, 13 May 2024 13:02:36 -0500

Is this technically feasible - that I don't know but it would seem to be. Since there are tools for github/gitlab/bitbucket that can do it then why not the standard git client.

I know that for GitHub I can also do it with curl (haven't checked the others).

What I'm trying to do is to have a usable wrapper around git for the novice and not require other packages.

One would think that it would be comparable to a "git push" but with the addition of the "git url" and some indication if the new repo is to be public or private. If it already exists then return an error message. And if it doesn't already exist then do whatever the current web interface to the git server does to define an empty repository. Having a requirement for an existing local repository would be reasonable for this to work.

I'm just asking if it can be done.

Thank you

Lionel B. Dyck <>< 
Github: https://github.com/lbdyck
System Z Enthusiasts Discord: https://discord.gg/sze

“Worry more about your character than your reputation. Character is what you are, reputation merely what others think you are.”   - - - John Wooden

-----Original Message-----
From: Sean Allred <[email-masked]> 
Sent: Monday, May 13, 2024 12:56 PM
To: [email-masked]
Cc: [email-masked]
Subject: Re: git client enhancement request

<[email-masked]> writes:
> I would like to see the option to allow the git client to request the 
> creation of a new empty git repository on the git server without 
> having to open the web interface to the git server to define a new 
> repository.
>
> Perhaps something like:  git server-repo public/private name

Is this even technically feasible? My understanding is that storage implementations of each forge vary *wildly*. I don't believe this would be under Git's ability to implement as a project.

You might look into combining your preferred forge's CLI with git
aliases:

  - GitHub has 'gh': https://cli.github.com
  - GitLab has 'glab' https://docs.gitlab.com/ee/editor_extensions/gitlab_cli

so you could alias

    git config alias.server-repo '!gh repo create'

to get something of what you want.

I believe GitLab also has a feature where you can create repositories just by pushing an existing repository to an empty project path.

--
Sean Allred