mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.83k stars 1.01k forks source link

[Git] If the Repository has no remotes, disable remote commands or prompt to add a remote #7176

Open jsuarezruiz opened 5 years ago

jsuarezruiz commented 5 years ago

If in a project using Git as VCS all remotes source are deleted, nothing happens. The project is still under VCS, but without any remote.

In these cases, we can not allow to delete all the remotes (there always remains at least one); or the project is no longer under VCS.

VS bug #796168

Therzok commented 5 years ago

You can still operate on a repository with no remote. You're comitting and doing everything locally.

Maybe the network commands (Fetch, Push) command should show that there's no remote configured, thus nowhere to push.

sevoku commented 5 years ago

Yes, I agree with @Therzok , and we should show the Publish command again (in this case it won't initialize the repo, but only push it to a new remote)

jsuarezruiz commented 5 years ago

Perfect. So, we must disable some network commands like push, fetch, update solution, etc. and show again the publish command.

jsuarezruiz commented 5 years ago

Sent PR: https://github.com/mono/monodevelop/pull/7189