I need to change the default branch of my GitHub repository in order to delete it (it was somehow set to default upon uploading a file in which some documents were missing). In other words, I need to upload it again but I can't delete it as is the default...
I don't have the settings option as instructed in the help page. GitHub support never answered my request.
Much thanks for your help
First - check to see that you are the owner of the repository, or that you have sufficient permissions.
1.On GitHub, navigate to the main page of the repository.
2.Under your repository name, click Settings.
3.In the left menu, click Branches.
4.In the default branch sidebar, choose the new default branch.
You can only switch between branches that already exist on GitHub.
EDIT:
If you are missing the Settings button try
Ctrl+F5.
If that doesn't work clearing the cache and cookies (I'd suggest to just try a different browser).
Related
I see this message below my repo name. Is there any way to remove it? I used template for my app for a quick start, but in current form my app doesn't look like this template, because everything changed so much. I don't see any reason why it's still there.
I had the same problem and at the time for writing this answer, there is no option of removing this from Github. So removed this tag by deleting the repository from Github and recreating a new one with the same name.
⚠️ This operation will preserve only the information stored in git, not all other Github features, i.e. issues, PRs, ... If your repository has been used for a while, this might not be the right time to do this anymore.
Specific instructions:
Make sure you have cloned your repository and all your non-stale branches are saved locally.
git fetch
Delete the original repository in the Github web UI.
Create a new repository with the same name.
Push the branches you want back to the remote.
git push
I haven't found anything about closing a GitHub/GitLab repository. I guess it's not feasible.
By "closed", I mean: it's possible to browse it/clone it, but not to create new commits/branches.
Maybe there is some kind of equivalent or other way to achieve this on either GitLab or GitHub for this? Bonus point if there is a readable error or message somewhere stating that the repo is closed.
On GitHub, you can "archive" a repository, making it read-only, which seems exactly what you're looking for. You can find a button to do so right in the settings of your repo, that is https://github.com/<username>/<repository>/settings. A banner will be shown stating that the repository is archived and no further modifications (e.g. new commits or branches) are possible. See this help page for more info.
On GitLab, the same thing can be done from Settings > General > Advanced settings > Archive project. See this help page.
I've been reading many tutorials, trying to figure out easy steps to the workflow for contributing to a GitHub repository using GitHub itself (I'm a Windows programmer, so I find the local git CLI extremely awkward, as well as much more complicated than working entirely remotely in GitHub).
I will post the steps as I discover and develop them in the answer below.
Please, I cannot do this on my own, as I barely know what I'm doing. Suggest edits to my answer, or post comments and I will edit.
Easy steps to contribute to an existing GitHub repository:
If there is not already an Issue posting describing the problem or code change, create one on the GitHub repository (repo) in the Issues section.
Create your own GitHub account, if you do not have one.
Go back to the GitHub repository (repo) and click the "Fork" button. This will create a copy of the entire repo in your account as your own repo with the same repo name.
In your new repo on GitHub, click on the button "Branch: master". Enter a name of your new branch (include the issue number) and press Enter to create a new branch for your changes.
In your new repo and your new branch, click on the file you wish to edit or click the "Create new file" button. Make your changes.
When you are happy with your changes, scroll down to the "Commit new file" section. The title can be something like "Created file FILENAME". Add a description of your changes, including the issue number. Click "Commit new file" button to commit your change before testing it. Repeat for any additional files.
At the repo (Code section), click the green "Clone or download" button. Download a zip file to use locally to build if needed and test your changes locally.
At the repo (Code section), you should now see a notice, "Your recently pushed branches:". This means that your edits in your own repo created a "recently pushed branch". Inside this notice is a green button "Compare & pull request". Take a deep breath and push it. You will now be at the "Open a pull request" page. This will automatically request that the owner of the repo accept your changes.
If you see a "checklist", edit it to reflect your work so far. Otherwise, describe your changes in detail, referencing the associated Issue posting.
Click the green "Submit pull request" button. This posts your entry in a conversation about this request. If there are no edit conflicts, you should also see a green checkmark icon and the words "This branch has no conflicts with the base branch".
Wait for a response from the repo owner.
This is as far as I've gotten.
I am working on this question and I need to switch the default branch of my Azure Repository.
How do I do this?
I can see where to switch the Compare tag but not the Default tag.
In the Get Sources properties, which can be accessed when editing the YAML pipeline, entering the "Triggers" menu at the top right corner:
Here's an article on how to do this: https://mattvsts.blogspot.com/2019/03/did-you-know-changing-default-and.html
The basic gist is to go to the repository settings in your project, then find your branch and right click to set as the default branch.
Go to - Manage Repositories as shown in the Manage Repositories Image
After this, it should be easy to figure out.
Click on Repos => Repositories
Find out your repo and the branch you want to make default. Right click on it and you will get the option 'set as default branch'
I use Git Explorer Repository to review my branches and tagged commits inside of Eclipse. These are all shown in a tree view on the left side of the perspective.
On a couple of occasions I've found myself accidentally double clicking on a branch / tag and suffering as the EGit checks out my working directory which can takes minutes in some cases and trigger unwanted auto builds. And then more minutes to get back to where I was.
Is there a way to customize the Git Repo Explorer to disable the default double click action to prevent these inadvertent mistakes?
There is currently no way to change the double-click action. Maybe we could consider showing a confirmation dialog in case the user invoked the action using a double-click. Please file an enhancement request for EGit.