Are you new to open source? If so, hopefully you have taken advantage of Hacktoberfest to get your feet wet. It's an exciting feeling to get your first pull request merged into a big project, but what happens next? If you want to keep working on the project, you will need to keep your fork current.
Here are some quick instructions on how to do that from beginning to end.
h/t to GitHub for having very clear instructions on this already. Here's all the steps in one place.
# If you haven't already added an upstream source, set your upstream # to the fork's original source git remote add upstream <url_to_original> # Verify upstream is correct, you should see the URL for the upstream fetch and push git remote -v # Get all recent branches and commits from the upstream git fetch upstream # Check out your current master branch git checkout master # Merge the branches and commits from the upstream git merge upstream/master # Push the updated master to your forked remote repository git push origin master
That's it. You should be up to date and ready to make your next PR.
Cover image by Salvatore G2 on Flickr