How to contribute to a GitHub open software repository? - github

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.

Related

Cannot access github releases for a repo, via web UI

I'm looking to test out github releases.
The guidance says:
On GitHub, navigate to the main page of the repository.
To the right of the list of files, click Releases or Latest release.
However, when I do this there is no "Releases" or "Latest release" button.
Is there some obvious configuration I need to do to the repo first?
Click on "tag" (you will find it at top left next to branches or search for it using Ctrl-F tag)
or simply go to https://github.com/USERNAME/REPO/releases.
Click on "Draft a new release".
Follow the guidance from step 4.

How to remove "generated from" tag?

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

Changing git account on Xcode

What I am trying to do is, I have a project that I got from someone on GitHub a little while ago. I just created my own GitHub account and wanted to link this app to my GitHub account so that I can use repositories and commit and push, etc. However in this app in the Xcode project in source control where it shows the master and history etc. it shows the name of the person who created the app originally and gave it to me. What I would like to do is to be able to link it to my account also so that when I commit something, he can't see it on his GitHub. I have already created a new repository on GitHub and have tried it out with a test app that I just made and it says my name under the source control side panel. I am not sure where to add a new remote and delete his for this project. I want to be able to commit and have it all set up on my account, so that he can't see my commits, etc.
What I have been doing before setting up GitHub was constantly duplicating the Xcode project whenever I wanted to add a new feature or edit something. I'm hoping this will help cut that step out?
If having the original owner not see your new contributions to the code is important to you, then you could simply clone the new repository that you created on GitHub and copy the code from his repository into your new one manually.
If you do not mind your code being linked to his original code, you can fork the repository on GitHub and then clone it and begin working from there.
Doing either of these methods will give you the same situation that you had with your test app, your name and information will show up in xcode, and you will be able to make changes to the repos.

How do you push in Github Desktop

Github Desktop version is Chocolate-Covered Yaks (3.3.4.0) 50415df.
There are a lot of tutorials and responses on here, but all of them talk about things like sync buttons. There is no sync in this version.
The files have been committed. Clicking on 'open this repository in explorer' shows all the correct files on the local computer, but they do not show up on the website.
Does anyone know how to push in the new version?
Alright. I'm assuming you have cloned the repo you are working in. And you own the repo you are working in. Meaning you have full access to the repo and you can push and commit to the repo.
https://i.imgur.com/K8zwLem.png
You need to make changes to your local files, it would show up like so in the screenshot above.
Once you have changes you are satisfied with, write something in the summary box and "commit" to the branch you are working on.
After you commit, you should get a button on the top right saying "Push origin"
https://i.imgur.com/K8zwLem.png
If you don't see it, try pressing the pull button before you push.

How to use branches in GitHub for Windows

I've just started using "GitHub for Windows", and I can't figure out how to see other branches (or create other branches).
The help page mentions this feature, and even shows a screenshot, but does not detail how to get to it.
I am aware of how to create and checkout branches from the command line, but I would like to do this from within the UI.
Does anyone know how to do this?
Found it! It's actually very easy when you realise where to look. The name of your branch is shown next to the "sync" or "push to github" button. Clicking on this shows all the existing branches, as well as a text box to create a new one: