docbrown/scripts/clean_fork.sh
Robin d7174923a2 Git scripts to sync or reset repository fork (#5055)
* Add script to clean / reset the fork and start from upstream

* Add script to sync fork with latest changes from upstream

* Remove swap file accidentially checked in

* Add exit on break to shell scripts and documentation of shell scripts to workflow-suggested workflow

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2019-12-30 13:58:16 -05:00

8 lines
235 B
Bash

#!/bin/sh
set -e
# clean up the fork and restart from upstream
git remote add upstream https://github.com/thepracticaldev/dev.to
git fetch upstream
git checkout master
git reset --hard upstream/master
git push origin master --force