in a local repo which already had a (codeberg.org) remote origin
,
I ran hut git create my-proj
, and got Created repository my-proj
.
No new remote was added to my local repo, though - which is what I would have liked.
Alternatively, the remote URL could be shown in the output, to add the remote manually.
That's the expected behavior.
git create
just creates the repository and does nothing else. Adding remotes by default sounds like a bad idea - maybe the user happens to be in a directory which has nothing to do with the new repository. Also, maybe the user wants to clone the repo instead of adding a remote.
true; The most common behavior though, would likely be, that the user would want a remote to be added. Could there be a flag (e.g.
--add-as-remote
) for that? and in either case, outputting the remote URL tostdout
would be useful, no?
Both sound like good ideas.
Note,
hut git create
already has a--clone
flag.