zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

Suggest to create the remote `origin` by default #864

Closed doronbehar closed 1 year ago

doronbehar commented 1 year ago

Hello,

Another first time user experience: When I create a project, why isn't --remote origin default? Also, if the remote already exists, why fail?

fatal: remote origin already exists.
2023/06/09 11:00:53 ERROR: project_create.go:99: exit status 128

How about suggesting to set the url of the remote to the project's url?

Regards.

prarit commented 1 year ago

Hey @doronbehar,

Git trees can be imported as remotes to projects, and as such it becomes very complex to determine what 'origin' really is. We've gone back and forth over this issue several times and ultimately we find out that we cannot precisely determine what origin is without a significant amount of knowledge of the user's configuration. Even then, we could be wrong :(