Add "Submitting code changes" section to "Contributing" section of README.md
I propose to add a new section "Submitting code changes" section to "Contributing" section of README.md. I will submit the changes in a pull request. I propose this:
Submitting code changes
[This assumes you are on Linux, you have read the "Building Liferea Yourself" section above, you have a GitHub account, and you do not have permission to modify the Liferea repo.]
-
Create a new issue (a bug report or feature request) on the Liferea repo. Get an issue number "NNN".
-
Wait for feedback and discussion. Maybe modify your issue to make it better. Maybe add more detail about the UI and operations of the new feature. Get to a point where there is some consensus and enough detail to know what to implement.
-
Fork the whole original Liferea repo on GitHub to make your own repo on GitHub: login to GitHub web site, go to repo, click "fork" button near upper-right.
-
In your new repo, create a branch (on project's main page in GitHub, click "Master" pull-down near upper-left, and type new branch's name, best to use a name such as "branchNNN"). Now the pull-down should show the name of your new branch.
-
From green "Code" pull-down button, get URL of your repo.
-
On local disk, at CLI, cd to your Projects folder (or similar), then "git clone https://github.com/YOURNAME/YOURREPONAME.git".
-
Cd into the new directory.
-
Have to "checkout" to the branch on disk ("git checkout branchNNN").
-
Do "git status" to see that you're on branch, not master.
-
Edit files on disk, test, repeat.
-
To see what you've changed, do "git diff".
-
Commit and push changed files to the branch as you go along, or after it's all working ("git add FILENAMES" and "git commit -a -m 'whatever'" and "git push -u origin branchNNN").
-
Get whole thing into a finished state.
-
When all changes are done and committed to the branch, open a pull request for the branch: on GitHub go to issue on original Liferea project repo, click on "Pull Requests" in top-center, click on green "New pull request" button on right side, click on link "compare across forks", change "head repository" to your repo on GitHub, change branch to your branch, verify that changes look okay, click green "Create pull request" button, set description and comment (add link to original issue), click green "Create pull request" button.
-
In original Liferea repo on GitHub, go to original issue and add a link to the pull request.
-
If all is well, the Liferea project owner should approve and merge the pull request (the changes) into the main Liferea project, and close the issue.
-
Your repo on GitHub should be tracking all changes to the original Liferea repo on GitHub, so you can keep using your repo for any additional work. In the top of the "code" tab of your repo, you may see a message like "This branch is 2 commits behind lwindolf:master." [How to bring your repo up to date with original Liferea repo ???]
Also:
What happens if later I delete my repo on GitHub, including any branches ? Is the original Liferea repo damaged in any way ? Is information lost ? Any URL links from original Liferea repo to my repo would become dangling.
No, the Liferea repo can't be damaged. You can remove your branch now that it has been merged, GitHub even puts a button for that on the merged pull request page. Your changes have been pulled into the Liferea repo, the commits are part of Liferea repo they are not "links" to other repositories. If you are talking about urls posted in issues or pull request comments that would point to your Github pages, this is a question for GitHub help, I don't know if they do anything special to redirect the urls ...
For the rest of this issue, I'm not sure we need the whole "how to use git and GitHub" replicated here. It's not specific to Liferea. And those are not the only "steps" possible. For instance if you wrote some code before opening an issue, I don't think anyone would mind if you directly post your code in a pull request to discuss. And personally I have the main Liferea repo as origin, because I cloned, and compiled and tested things on it before writing code and then I made a GitHub fork to publish it.
You also don't need to post the urls of the pull request in the issue, just include fixes #NNN in the pull request or commit comment, but that is a topic for GitHub help, it is not specific to Liferea.
I see a message like "This branch is 2 commits behind lwindolf:master." on my repo. How can I bring my repo up to date with the original Liferea repo ?
On GitHub itself, it doesn't seem possible to directly pull the changes without making a pull request to your own repo, which sounds a bit silly.
So you have to pull the changes from Liferea's master branch into your computer's local master branch and then push that to your repo's master branch.
You can add the official Liferea repo as a remote to pull from it. Or you can do git pull https://github.com/lwindolf/liferea master. As you worked on a different branch, it should be a "fast-forward" merge.