I linked this DevOps repo inside my Databricks workspace Repos, but now I want to get rid of it.
And no matter how much I've searched, I can't find a way to do something that looks this simple.
I would have expected a button or an option like "Remove Repo", but that doesn't exist.
This is what I mean.
Thank you.
To get rid off existing repo, you need to add new repo.
You can add new repo using below steps.
Here you need to provide URL of new Git repo
If you want to select other Git provider. Go to User Settings you can remove Azure Devops Services and select your preferred Git provider from the dropdown list.
Related
Our organisation stores code on github and there are certain ways-of-working that we want new repos created by our team to adhere to (e.g. there is a default set of workflows at .github/workflows that each repo should have, a basic .gitignore, linter config files in .github, etc..). Hence we have built repo templates that people can instantiate using a tool called cookiecutter. Its working really well. Note though that cookiecutter only automates the creation of content, it doesn't actually create the git repo (i.e. it doesn't run git init) and it doesn't create anything on github. Hence, the workflow for someone to use one of our templates is:
cookiecutter --output-dir new-repo-name https://github.com/our-org/our-template-repo
cd new-repo-name
git init
gh repo create new-repo-name --private --source=. --remote=upstream
git add .
git push
Hopefully you get the idea.
We then had an idea that we would like to be able to track all the github repos that get created from our templates. We thought a nice way of doing that would be to ensure that each of those repos had a certain label on them.
Hence I'd like to be able to automatically create labels on such newly created repos. Does anyone know a way of doing that? (I was hoping there was perhaps a way of achieving it by putting a certain file into the .github directory, but alas it seems there is no such thing.)
The only labels that come to my mind are the classic GitHub Labels for issues and pull requests. You can also create them with the GitHub CLI. In your case you could add something like gh label create template --description "Created with template xyz" --color 348AA7 to your script. Let me know if this was helpful.
I'm part of an organisation on github and would like to copy all the repos of that organisation to another regular github account at once.
I thought there would be a tool to help me to do this easily but haven't found one yet. What would be the easiest way to approach this? Thank you
I have tried looking into gh but I'm not sure it's the right tool for it. All I'm trying to do is basically cloning all the repos of the organisation I am a part of to another github account in one go
I have tried looking into gh but I'm not sure it's the right tool for it.
Considering there does not seem to be a native feature allowing for a bulk copy you want, gh is actually a good option.
Depending on the fork policy of your organization and the nature of said repositories (public or private), you should be able to write a script, using the GitHub CLI gh, which would:
list the repositories of an organization (gh repo list)
fork it (gh repo fork)
Note that will not copy issues or pull-requests.
In my previous Github repos, I was able to create a project under the repo which was specific to the repo, but now I cannot see this option for the new repos.
I can still use Project (Classic) in my previous repos.
Github now push me to create a project under my account, and link to the repo, but I want to create a project just under the repo.
In my side, the problem is that, when I try to create an "Issue", the user can see all of my projects under my account, but I don't want that.
The user should only see the related project.
Can I somehow have the previous version of the projects?
Thanks
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.
How can I un-fork a GitHub repository?
I have never seen unfork option - is it possible to do that?
Update: There's now an automated solution
See https://stackoverflow.com/a/66470086/151312
Original Post
As of now Github doesn't have an unfork option, so the only solution is to delete the forked repo.
Warning: The following solution will delete your cloned repo.
If you want unfork without your repo is being deleted try this https://stackoverflow.com/a/41486339/6335029
Step 1: Goto Settings of Repo you want to unfork
Step 2: Click Delete this Repository
Step 3: Enter your name / Repo name
Step 4: click "I understand the consequences, delete this repository" button
GitHub support can do this for you.
Go to this link https://support.github.com/contact?tags=rr-forks
Type in "unfork"
Let the virtual assistant help you
They completed the process for me within 1 minute after that.
Option 1: Rename, import, delete
Rename your old fork (e.g. repo.old)
Import your old fork as a new repo (Note: provide the https:// or git:// URI of the old fork)
Delete / archive the old fork
Note: the "import" option is an option when creating stuff:
Option 2: Clone, delete, create, push
Back up your repo! E.g. git clone to your local file system.
Delete the original repo from GitHub (See the other answer...)
Create a new repo with the same name
Push your local backup to the new GitHub repo
I recommend option 1.
Whatever you do, back up your work! Especially if you follow the other answer, which just tells you to delete your repo...
Unfork without deleting the repository
Go to this link https://support.github.com/request?q=unfork
Click on "Our virtual assistant can help with detaching/unforking a repository"
Click Detach
It will ask for the Repository link
Done.
There isn't a way to do it via the web portal (without cloning/deleting the repo as described in other responses). I put in a request to GitHub support, asking them to convert the repository to 'normal mode', and they did it within five minutes.
You can always send in a ticket and have GH support detach it from the fork network for you. That way you keep the followers, issues, etc.
It's possible, follow these steps:
1- First go to the parent project anf change it's visibility
2- Then do same with the child project
3- Then revert all repositories to thein initial state of visibility.
This worked for me. I hope same for you.