Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let me add existing repositories #783

Closed
gkinsman opened this issue May 24, 2023 · 14 comments
Closed

Let me add existing repositories #783

gkinsman opened this issue May 24, 2023 · 14 comments
Labels
Area-Machine-Config-Repo Related to Repo setup, cloning, etc Issue-Feature New feature or request Resolution-Duplicate This issue or pull request already exists

Comments

@gkinsman
Copy link

Suggested new feature or improvement

I already have a lot of repositories on my machine, but this tool wants to re-clone them given a URL. I want to be able to add existing folders, and then have this tool detect the remotes etc.

Ideally, I'd be able to add a directory (with optional sub-directories) of folders with git repo's and it would pick them all up

Scenario

I have existing repositories. Make it easy to add them here.

Additional details

No response

@gkinsman gkinsman added the Issue-Feature New feature or request label May 24, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label May 24, 2023
@gkinsman
Copy link
Author

This is a duplicate of #780 and #779

@bstordrup
Copy link

Not a duplicate of #779, but yes, a duplicate of #780

@gkinsman
Copy link
Author

Not a duplicate of #779, but yes, a duplicate of #780

It feels like there's a higher level feature here, in which we'd be able to add folders of repo's instead of just repo's directly. My folder setup looks like this:

/projects/personal/projectA
/projects/personal/projectB
/projects/work/projectC

I'd love to be able to add my projects directory, and have all of the nested projects be added. There might need to be some configuration around how deep to search, or folders to exclude to prevent node_modules from being problematic, but the idea is there!

@bstordrup
Copy link

bstordrup commented May 24, 2023

Like searching a folder structure for the .git subfolders and importing the repositories with the origin upstream.

@gkinsman
Copy link
Author

Yeah! The remotes could be auto detected from the repo so it just needs to detect the folders with some smarts.

@bstordrup
Copy link

Any idea where the information about repositories are stored locally?

@gkinsman
Copy link
Author

Yep, remotes and tracked branches are in .git/config

@dhoehna
Copy link
Contributor

dhoehna commented May 24, 2023

Thank you so much for filing feedback about the repo tool!

QQ. If the repo tool did find local repos, what would you want it to do with that information? Suggest to clone in the location of existing repos, move your existing repos to a new clone location, something else?

I'm not angry or making a challange, I'm just curious.

@bstordrup
Copy link

@dhoehna, if the tool finds a local repo that is already connected to a remote origin, then it indicates strongly that the local repo already is a cloned repository, and hence no need to clone.

What also puzzles me is that even if I did clone a repository that I did not have already cloned, it did clone it as expected. But I cannot in DevHome see any indication of which repositories were cloned. It would be very nice with a list of already cloned repositories in the tool. Otherwise, the value of DevHome would IMO be rather limited.

@bstordrup
Copy link

@gkinsman, I was more thinking about where DevHome stores information about which repos have been cloned.

@krschau krschau added the Area-Machine-Config-Repo Related to Repo setup, cloning, etc label May 24, 2023
@gkinsman
Copy link
Author

Thank you so much for filing feedback about the repo tool!

QQ. If the repo tool did find local repos, what would you want it to do with that information? Suggest to clone in the location of existing repos, move your existing repos to a new clone location, something else?

I'm not angry or making a challange, I'm just curious.

You're right to go high level still - it's worth asking what the ultimate goal of this tool is to define what features might fit and what wouldn't.

Today I use Fork (https://git-fork.com/) to manage my git repos, but maybe Dev Home could one day be a portal to open Fork - who knows! I like the idea of a central place where I can view everything on my machine.

@dhoehna
Copy link
Contributor

dhoehna commented May 24, 2023

I like the idea of a central place where I can view everything on my machine.
Yes. This right here, I think is the essence of all the issues "I want to see my already cloned repos."

@gkinsman
Copy link
Author

@gkinsman, I was more thinking about where DevHome stores information about which repos have been cloned.

Ah righto sorry - yeah I have no idea about that - would assume it's some program data location as it's a windows store app 👍

@asklar
Copy link
Member

asklar commented May 27, 2023

Duplicate of #702

@asklar asklar marked this as a duplicate of #702 May 27, 2023
@asklar asklar closed this as completed May 27, 2023
@krschau krschau added Resolution-Duplicate This issue or pull request already exists and removed Needs-Triage New issue that the core contributors need to triage labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Machine-Config-Repo Related to Repo setup, cloning, etc Issue-Feature New feature or request Resolution-Duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants