git lesson please

Hal Murray hmurray at megapathdsl.net
Wed Dec 13 06:25:13 UTC 2017


devel at ntpsec.org said:
> Er, whoops! I broke that as part of my fix for improperly generated  files.
> Should be fixed now. 

Thanks.

Is there a simple way to do a git pull when I have edits in progress?

[murray at hgm raw]$ git pull
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
[murray at hgm raw]$ 

I can commit them, but I'd like to do more testing first.  I expect all the 
files I've edited don't conflict with any recent changes.  I could save them 
off to the side, checkout to make git happy, git pull, then restore the saved 
copies.  There must be a better way.

Correspondingly, if I commit some changes, then discover a better way, is 
there a simple way to undo a commit?  I think revert applies another commit 
that undoes the edit, but that leaves cruft in the log.  Is there an 
option/command for the special case where the commit I want to undo is the 
last one?
 


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list