The method above is OK, but another method:
Use git commands in your repo:
Create a new remote upstream (the name can be arbitrary) git remote add upstream https://github.com/username/reponame.git The link address is the source project address of your fork project
Then fetch the upstream code git fetch upstream
Finally, you can merge the code on upstream into your own branch git merge upstream/master If it is not the master branch, change it according to your own situation. If your code does not conflict with the one on upstream, then everything will be fine~finished.
You can rebase or merge, depending on your habits, the number of clones of your warehouse, etc. If you want to contribute back, you must also consider the other party's historical management policies.
The method above is OK, but another method:
Use git commands in your repo:
Create a new remote upstream (the name can be arbitrary)
git remote add upstream https://github.com/username/reponame.git
The link address is the source project address of your fork projectThen fetch the upstream code
git fetch upstream
Finally, you can merge the code on upstream into your own branch
git merge upstream/master
If it is not the master branch, change it according to your own situation. If your code does not conflict with the one on upstream, then everything will be fine~finished.Send a pull request and reverse the direction
You can rebase or merge, depending on your habits, the number of clones of your warehouse, etc. If you want to contribute back, you must also consider the other party's historical management policies.