Git question

Dr M J Carter Martin.Carter at
Fri Jan 10 10:12:27 UTC 2020

On Thu, Jan 09, 2020 at 11:57:56PM -0800, Michael wrote:

> On 2020-01-09, at 2:33 PM, Steven Smith <[1]steve.t.smith at>
> wrote:
>> Me too. We’re discussing MacPorts-relevant git commands
>> in [2] .
>> Easiest, most destructive to local:
>> # save all local files changed outside the git repo
>> git fetch --all
>> git reset --hard upstream/master
>> # restore all local files

Argh, but I invoke Thompson's Law.

> I'm sorry, I just have to follow up with this xkcd ...
> [3]

Don't forget the mouseover.

MaJoC's \euro 0.02: Always do a "git fetch" immediately before saying
"git push" etc.  Sometimes I manage to produce my own conflicts by
working at home and work separately, and this trick at least forewarns
me nondestructively of any interesting surprises which may be pending.
HTH, folks.

Dr Martin J Carter
Computer System Administrator
Astrophysics, University of Oxford

More information about the macports-users mailing list