[GLLUG] Really weird behaviour from git

John Winters john at sinodun.org.uk
Thu Jan 2 12:35:40 UTC 2014


On 02/01/14 12:29, James Courtier-Dutton wrote:
> On 2 January 2014 12:11, John Winters <john at sinodun.org.uk> wrote:
>> I set out to do a bit of bug fixing today, but I'm being stymied by some
>> really weird behaviour from git.  Things seem to be getting staged without
>> me asking for them to be.  An illustrative transcript, cut and pasted from
>> my terminal session:
>>
[snip transcript]
>>
>> Can anyone explain this?  It's never happened to me before.
>>
>
> You must are doing something.

As you can see from the transcript, I'm not.

> For example, only a "git add" would have moved the able.txt to the
> "changes to be commited" list.

Well, yes - that's my understanding of how it's meant to work.  Hence my 
description of the behaviour as weird.

> Are you editing them in a IDE, or with something else like VIM?

Vim.  And I didn't do any editing (nor was Vim running) during the 
session shown.

> The IDE might be doing git commands for you behind the scenes.

No IDE involved.

> Is there a cron job doing the git adds?

john at nuc:~$ crontab -l
no crontab for john
john at nuc:~$


> Do you have shell aliases set up, that might be doing git adds when
> you type something else.
> type "aliases" to find out.

john at nuc:~$ aliases
bash: aliases: command not found
john at nuc:~$

As I said - it's really weird.

I'm wondering whether git has managed to corrupt its internal data files 
or something like that.  I've renamed my whole work directory to move it 
out of the way, and then done a fresh "git clone" from my git 
repository.  I'll see whether the odd behaviour continues.

John





More information about the GLLUG mailing list