-
Fork repository from source and create copy under my GitHub account
-
Clone forked repository to local machine
git clone https://github.com/YOUR_USERNAME/YOUR_FORKED_REPO.git
-
Set up repository as remote. In this ecample, the source repository is remote named upstream
cd YOUR_FORKED_REPO git remote add upstream https://github.com/FRIEND_USERNAME/FRIEND_REPOSITORY.git
-
Before making changes, make sure the local repository is synced to the remote repository. Then resolve conflicts and push the updated branch to your fork on GitHub
git fetch upstream git checkout main git merge upstream/main git push origin main
-
Make your changes
git checkout -b my-feature-branch # Create new branch for your fix git add . git commit -m "Description of my changes" git push origin my-feature-branch
-
Create pull request. Go to your forked repository on GitHub, create a pull request to merge into source branch
- Ensure the base repository is source (USERNAME/REPOSITORY/main or master)
- Ensure the head repository is your fork (YOUR_USERNAME/YOUR_FORKED_REPO)
- Fork the repository once: Create a personal copy of the repository on GitHub.
- Clone your fork: Bring the repository to your local machine.
- Set up the original repository as a remote: This helps you keep your fork up-to-date with the original repository.
- Sync your fork: Regularly update your fork with changes from the original repository.
- Work on feature branches: Create separate branches for each feature or fix you work on.
- Create pull requests: Propose your changes to be merged into the original repository.
Coming soon