GitHub insights and tips
Tags: osdc, opensource, programming, github
Published: 2023-01-10 08:58:22

---
series: OSDC
---
## Edit public GitHub repository **via the web UI** and send pull requests

#### Modify the README markdown file 
The README file is initially displayed in it's web format. 
In order to modify it, click the README.md file, and then click the little pencil to enter edit mode.

#### Steps to edit the public repository
* Go to the <u>original</u> public repository (to which you want to contribute changes), e.g. [open-source-by-higher-education by @szabgab](https://github.com/szabgab/open-source-by-higher-education)
* Enter the file you wish to modify by clicking the file name
* Click the little pencil to edit the file
* Make your changes to the file
* Scroll down to the bottom of the page to the 'Propose changes' section
* Enter a comment summarizing your modification
* Click the green button 'Propose changes'
* This will automatically create a fork (copy of the original repo in your own repo) and a branch in your own repo, and lead to a page for comparing the changes and sending a pull request.
* Review the modifications (new in green and old in red)
* At the top of the page, make sure the pull request goes from the new branch on your repository to the main branch on the original repository (if not, then you probably missed something along the way, so cancel try the above steps again).
* Click the green button 'Create pull request'
* An 'Open a pull request' page will appear
* Review modification at the bottom of the page, then click the green button 'Create pull request'
* This will lead to the original repo, click the 'Pull requests' tab to review your pull request
* **Make sure your changes passed the CI tests**, otherwise, fix them on the branch of your own repo where you made the changes. **No need for additional pull request, as every change to the branch will automatically send a pull request**.
* Go back to your own repo, first sync the main branch with the original repo, and then remove the branches other than the main branch to avoid clutter

#### Remove branches on your own repo
* Somewhere on the top left of the page there is a drop down of all the branches. The one that is shown initially is the 'main' branch. Click the little arrow of the drop down.
* A list of all branches will appear. Click the 'View all branches' link on the bottom of the list.
* Delete all the non-desired branches using the garbage icon 

#### Sync your repo with the original repo
* Visit your own GitHub page e.g. [my github](https://github.com/ShulyAvraham)
* Click the copy of the repo e.g. [my copy of open-source-by-corporations repo](https://github.com/ShulyAvraham/open-source-by-corporations)
* Look for 'Sync fork' button and click it
* If the there are conflicts you will be asked to resolve them
* If there are no conflicts, your own repo will be synched with the original repo.

### Repo insights
Click the **Insights** tab to see stats metrics about the repo, such as who made commits to the repo and how many, and much more.

### Blame
Click the **Blame** button on a specific file to view history of who made changes to the file and what changes.