Open hypervtechnics opened 5 years ago
Could you elaborate?
Do you want Fork to propose a subdirectory (for example c:\source\github.com\reponame
?
You said it. 😄 Profiles could be used to leverage this.
Assume the following:
Cloning repository from: https://git.example.com/auser/arepository.git
Storing all repositories in: C:\Repositories\
Fork should propose: C:\Repositories\git.example.com\auser\arepository\
This can be either done via RegEx (as e.g. Azure DevOps has some kind of ugly urls) or by just extracting the last two path segments.
Profiles may contain some additional information as aliases:
Profile 1:
Clone Host: git.example.com
Author information: Me <me@example.com>
Path for repositories: git.example.com\
(appended to the base path defined in the already existing option)
Detect user: Yes
Extraction method: RegEx/Url
Profiles would also make it easier to switch the author in other repositories by just proposing author information from other profiles.
Let me know if you have questions 😃
For the author part this might help maybe: https://github.com/gesquive/git-user
I just realized that this may also set things like the bug tracker rules according to the host to also provide integrations with non-popular (Gitea/Gogs) git servers without user interactions.
OK, first of all I think Fork should not propose a default subfolder on clone.
Regarding the bug tracker integration.
I believe, 99% of gitlab/gitea/gogs/bitbucket users use third party issue trackers (Jira, Redmine, YouTrack, etc). Creating rules according to host names doesn't make much sense there. It might happen that I didn't understand the proposal correctly, in this case I need more details.
According to this: https://riptutorial.com/git/example/31016/multiple-usernames-and-email-address
The feature was partly implemented in Git. A cool UI for this would be nice but definitly no must. Just wanted to drop it here in case someone/you (@DanPristupov) is still interested in this... :)
What role would Fork play? Provide UI to edit the mapping user <=> folder and suggest a path based on the clone URL. (Simple RegEx would suffice)
Another source: https://stackoverflow.com/questions/4220416/can-i-specify-multiple-users-for-myself-in-gitconfig
Especially private/work scenarios would profit from this.
Thank you. I didn't know about that feature.
I'm not sure how Fork might configure that without confusion, but I will think about that.
P.S. Sorry, might have closed the issue accidentally
@DanPristupov Adding profiles would make sense in such way as GitKraken does it, where you could create profiles that support different ssh keys and username/email for current context.
Make it possible to clone into a subdirectory. The directory should be based on the host of the clone URI and also change the author accordingly.