I’ve tried searching for an elegant way (i.e. that doesn’t involve deleting the local directory and cloning again) to update a severely stale local repo from a remote repo using git, but haven’t found a good answer. The command I’m looking for would basically resolve any conflict by using whatever the remote repo says and deleting local files if need be (in case they no longer exist in the remote repo) and ignoring any and all chancges I might’ve made to tracked files.
I’ve tried searching for an elegant way (i.e. that doesn’t involve deleting the local
Share
You could:
So you don’t have to deal with “merge conflicts”: it is sort of a global reset (proceed with caution if you had any work you would like to keep, which doesn’t seem to be the case from your question).
The OP Syrahn went for a simpler way:
Note that there are ways to emulate “theirs” option, even if “Git merge -s theirs: Simply?” explains why it isn’t very visible: see “git command for making one branch like another“