Thread (29 messages) flat view 29 messages, 16 authors, 2016-08-14

Re: why is git destructive by default? (i suggest it not be!)

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:44:49

Possibly related (same subject, not in this thread)

Boaz Harrosh [off-list ref] writes:

Sorry
git-reset --clean -f/-n for removing local changes
git reset --hard for moving HEAD on a clean tree only
Wouldn't "git reset <commit-ish>" be enough then?  It modifies where
current branch points to (as opposed to git-checkout modifying what is
the current branch), and it modifies index.  What it doesn't modify is
working directory, but it is clean already.

So the solution is: don't use `--hard'.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help