Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git: sync local repo with remote one
http://stackoverflow.com/questions/6373277/git-sync-local-repo-with-remote-one
This makes your local repo exactly like your remote repo.
Remember to replace origin and master with the remote and branch that you want to synchronize with.
git fetch origin
git reset --hard origin/master
git clean -f -d
@BrianJerez

This comment has been minimized.

Copy link

BrianJerez commented Jan 17, 2018

thank you! :)

@RewoSiedge

This comment has been minimized.

Copy link

RewoSiedge commented Jul 9, 2018

Nice solution, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.