[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stupid git!
From: |
Alan Mackenzie |
Subject: |
Re: Stupid git! |
Date: |
Sat, 12 Sep 2015 12:52:19 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, David.
On Sat, Sep 12, 2015 at 12:40:20PM +0200, David Kastrup wrote:
> Alan Mackenzie <address@hidden> writes:
> > Hello, Emacs.
> > git has struck again, and another couple of hours valuable time have
> > been lost.
> > Having "staged" a change with `git add', I then tried to commit it with
> > `git commit'. Somebody else had got in before me, so I had to pull
> > their changes first - fair enough.
> Uh, no? git commit goes to your local repository. There is nobody else
> who could "get in before you". You never need to pull before
> committing. You may want to rebase after pulling, depending on your
> kind of change.
My mistake. I'd committed the change, then tried to push it. Sorry
about that.
> > So I aborted this merge operation, in order to see what it's doing
> > first. git has kindly discarded my (staged) change, leaving no record
> > of its existence - good job I've still got a copy of the changed file
> > in Emacs. Scrabbling around in the .git directory, I found the commit
> > message in a file there. So all is not lost.
> > How do I see what changes are in file-notify-tests.el, which is in the
> > staging area?
> git diff --cached
Thanks!
> > Time to save my changed file and have a coffee. Isn't git wonderful!
> When things start looking fishy, don't just stumble on blindly. Save
> what you got somewhere else, and _then_ try muddling through. That's
> not particular to Git.
Not totally, no.
> --
> David Kastrup
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Stupid git!, (continued)
- Re: Stupid git!, David Kastrup, 2015/09/12
- Re: Stupid git!, Dmitry Gutov, 2015/09/12
- Re: Stupid git!,
Alan Mackenzie <=
- Re: Stupid git!, Giuseppe Scrivano, 2015/09/12
- Re: Stupid git!, Alan Mackenzie, 2015/09/12
- Re: Stupid git!, Andreas Schwab, 2015/09/12
- Re: Stupid git!, Eli Zaretskii, 2015/09/12
- Re: Stupid git!, Alan Mackenzie, 2015/09/12
- Re: Stupid git!, Dmitry Gutov, 2015/09/12
- Re: Stupid git!, Alan Mackenzie, 2015/09/12
- Re: Stupid git!, Sven Axelsson, 2015/09/13
- Re: Stupid git!, Alan Mackenzie, 2015/09/14
- Re: Stupid git!, David Kastrup, 2015/09/14