There are tons of services for hosting your Git repositories.
- GitHub
- GitLab
- Bitbucket
- SourceForge
We will use GitHub
GitHub is a cloud-based hosting service that lets you manage Git repositories.
GitHub is the largest host of source code in the world, and has been owned by Microsoft since 2018.
-
In the upper-right corner of any page, use the drop-down menu, and select New repository.
-
In the Repository name box, enter
OSC
. -
In the Description box, write a short description (optional).
-
Select Add a README file (optional).
-
Select whether your repository will be Public or Private.
-
Click Create repository.
To clone your repo you can find its URL here :
Any public Git repository can be forked. A fork creates a completely independent copy of Git repository.
Forking a repository allows you to freely experiment with changes without affecting the original project.
For example, you can use forks to propose changes related to fixing a bug. Rather than logging an issue for a bug you have found, you can:
- Fork the repository.
- Make the fix.
- Submit a pull request to the project owner.
Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
Pull requests can only be opened between two branches that are different.
-
Fork Main Repository and Create a Local Clone.
-
Make Needed Changes Locally (resolve an issue or make new feature)
-
Push Local Changes to Forked Repository.
-
Make a Pull Request. This is where the actual pull request takes place! After requesting a pull request, the main repository maintainer is alerted for review. The maintainer will then review the work done in the developer’s forked repository, and then make any comments or request any edits that need to be made for approval.
-
Any edits are then sent back to the developer for additional commits (changes to code) that may be needed. If no edits are needed, the pull request is approved by the maintainer.
-
Merge with Main Project. Once the repository maintainer has approved a pull request, the developer’s new updates in the forked repository are merged with the main project repository. The product is then updated with the new feature or bug fix, and can now be viewed by end users.