Is it possible to group git repositories into subfolders under AzureDevOps? - azure-devops

Recently, we migrated from our TFVC to git repository. I would like to decouple a few of our solutions into separate git repositories. Is it possible somehow to group these newly created repos under some kind of subfolder on AzureDevOps?

Is it possible to group git repositories into subfolders under AzureDevOps?
The answer is yes.
The most important thing before starting is to backup your current project/solutions.
I created a simple example to demonstrate how to accomplish it.
I created a repo with three solutions (Solution1, Solution2, Solution3)in it:
Add three subfolders (Subfolder1, Subfolder2, Subfolder3)in this repo via Azure devops web page:
Now, open our Visual Studio locally, connect to this repo. And move the solution1 to the subfolder1 in the file explorer:
Then, push this change to the repo:
Now, the solution1 moved to the subfolder1.
Update:
But basically my question was if there is possible to create
subfolders for some git repositories, not a subfolders inside git
repository
I think it is impossible to create subfolders for some git repositories. You need to create other repo in the project. When you have lots of repos, folders aren't your best friend. Tagging, quick-filter and search are.
Please check this thread for some details.

Related

Symlink for a README.md file from another Repository

I'm wondering wheather this is possible with GitHub.
As you can see below, I have two respositories. One is Primary, where I'm writing some of the Common MarkDown files for some of my Projects. Two, is the actual Project Repo, where I want to refer the Markdown file fomr Repo1 as a symlink and render it.
RepoOne -
/abhinavbharadwajr
../absolutebeginner.md
RepoTwo -
/pythonexamples
../Absolute Beginner
../../absolutebeginner.md
Is this Possible? I have seen people creating symlink within a Single Repository, but not like this.
No, that's not possible. First of all, GitHub doesn't check out files from separate repositories on disks. All the repositories are bare, so there's no way to resolve the symlinks outside of the repository. GitHub has no way to know that a repository symlink that points outside of the repository necessarily symlinks to another repository and what that is, since it could point to any possible location.

Can I commit into specific folders inside a repository in GitHub?

As a part of my traineeship, I'm supposed to create a single repository for my final projects.
Inside that repository I'd have created 3 folders (task, project1, project2).
Since I'm quite new to GitHub, I'm not entirely sure how to achieve that.
I know how to create a new repository, but uploading into a specific folder seems extra confusing for a dodo like myself.
Many thanks in advance.
If you create a new repository (github.com/me/myNewRepo), you can:
clone it locally
cd (change directory) to myNewRepo
create your subfolders there (with files in it)
add/commit and push
You will see those same subfolders in github.com/me/myNewRepo
(Replace Me by your GitHub user account, and myNewRepo by a more meaningful name)

Config eleventy data folder for github

How to config the _data folder to another git repository? The whole folder is clone from github and want to continue due to easy update. But the _data folder need to sync with another data repository. How can I config it?
Actually just one yaml file : _data/authorlist.yaml
What to put into package.js if want a script to sync the yaml file with github?
Thank you.
You can use Git submodules to keep a shared repository of data files that you can use in multiple projects. This will allow you to keep a reference to the data repository in your projects, and pull updates to this repository with a single command. The great thing is that submodules are a built-in feature of Git, so it's independent of any NPM scripts, environments (like a bash script would be) or frameworks. See the link above for documentation on how to set up and work with submodules.

is it possible to commit all selected projects from Eclipse to one github repository

how is it possible to commit all selected projects from Eclipse to one github repository(as imaged below)?
Currently when I commit my new project to github, a new repository will be created.And I'd like to avoid creating massive number of new repositories.
Thank you in advance!
p.s.I found other related topics for this question, but don't know what I should do exactly.
need your help please.
There shall be an Eclipse plugin that'll do your git job but I'll tell you a generic solution in case that plugin is not helpful. Well, all these selected projects are directories basically and if they're residing inside the same directory, let say <dir-1>, then you can add the remote repo path to <dir-1> using git remote add origin <git-path> and then add all your directories i.e. projects which will be part of the git repo. Best case would be to create separate branches for each of these projects and then merge those branches to master when they reach a logical state without any breaking changes. Now, in case, if all these directories are not residing inside <dir-1> then create a symbolic link inside <dir-1> to all those projects (possibly with same names) so that whenever the original directories are updated these directories are also changed respectively. Check more about symbolic links.

Recover code repository in Github?

I recently inherited a project that used to be setup with Github for version control. However, due to lack of communication from the original developer, I'm left with code base that lives on the production. Question I have is if it's possible to recover a code repo in Github given that I have the .git folder that contains all git related files?
If there's an existing .git folder, it's probably an existing git repository. You could just follow the instructions for adding an existing project to Github and get it that way.