Fork a repo
In GitHub, when we want to make changes on someone else's project, we would fork(copy) the repo to our own account, so we can make changes to the project, without affecting the original project.
If we are not using GitHub, we can add a upstream remote to do the same thing.
We have 3 different repos:
Upstream repo (3rd party repo)
Our fork repo (a copy of upstream repo, and we have full control)
Our local repo (a clone of our fork repo, our working copy in local machine)
Steps
Create our fork repo
Clone our fork repo on local machine
Add upstream repo as a remote
Pull from upstream and push to our fork repo
1. Create our fork repo (on our git server)
2. Clone our fork repo (on local machine)
3. Add upstream repo as a remote
list all remotes:
Add upstream repo
4. Pull from upstream and push to our fork repo
Last updated
Was this helpful?