Skip to content

Instantly share code, notes, and snippets.

@richardoey
Last active March 17, 2021 01:24
Show Gist options
  • Save richardoey/5ebd5cab438cd77ec1b1497880326e5f to your computer and use it in GitHub Desktop.
Save richardoey/5ebd5cab438cd77ec1b1497880326e5f to your computer and use it in GitHub Desktop.
Getting branches to same level as master git command

If you want to make to be the same as master

git checkout development
git reset --hard master
git push -u origin <local-branch-name>

Force your forked repo to be the same as upstream. Forces master changes into fork and throws away all changes! if no upstream remote created: git remote add upstream https://[upstream guy's repo url]

git fetch upstream
git reset --hard upstream/master
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment