DEV Community

Discussion on: How to sync your fork with the parent repository

Collapse
 
d2s profile image
Daniel Schildt

Another option is to create a script (for example: scripts/pull-changes-from-upstream.sh) to the repository for helping new contributors. Then people already have a helper available to keep them on track more easily. Better to have good defaults (whatever those are), and automate basics so people don't have to quess what is the development workflow of a project.

#!/usr/bin/env bash

# Add upstream Git repository
# git remote add upstream URL_OF_GIT_REPOSITORY

# Merge latest changes from the upstream Git repository
git fetch upstream
git checkout master
git merge upstream/master