I have forked a git repo. Is the forked repo automatically updated if the origin has updates? Or should I perform some commands in cmd to make this forked repo updated? What are this commands?
Go to your GitHub account, under your forked repository. Click the compare and pull request button. And you are done. Wait for your content to be reviewed, make changes where necessary and your pull request will be merged to the team project.
About forks A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the original repository. You can fetch updates from or submit changes to the original repository with pull requests.
They have very specific help on this topic on the github docs: https://help.github.com/articles/fork-a-repo
Configure remotes
When a repo is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote named upstream:
git remote add upstream https://github.com/octocat/Spoon-Knife.git
# Assigns the original repo to a remote called "upstream"
git fetch upstream
# Pulls in changes not present in your local repository,
# without modifying your files
Pull in upstream changes
If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:
git fetch upstream
# Fetches any new changes from the original repo
git merge upstream/master
# Merges any changes fetched into your working files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With