# I messed up my own git tree and I don't know how to fix it.

9 messages from 2019-04-21 to 2019-04-21. Participants: rob, Adrian H, Philip Oakley, Andreas Schwab.
Thread: https://gitlist.dev/t/50960

## rob, 2019-04-21 03:01

Subject: I messed up my own git tree and I don't know how to fix it.
Message-ID: <cb1f725f-1314-d320-104a-726ef1c906fa@fastmail.com>
URL: https://gitlist.dev/e/cb1f725f-1314-d320-104a-726ef1c906fa%40fastmail.com

```
I have my own code at a github repository, using Go.  Part of using Go 
libraries not part of the official Go people is by using a system they 
call go get.  This essentially uses git to, well, go get source code.  
Mine are at github.com and golang.org.  My computer runs LinuxMint 19.1.

I used goland IDE from jetbrains to run go fmt on my entire project.  
Now I am getting this message that I cannot get rid of:

changes not staged for commit:

   modified: github.com/alecthomas/gometalinter (modified content)

   modified: github.com/kisielk/errcheck (modified content)

   modified: github.com/rogpeppe/godef (modified content)


I do not want any changes to central repos to be tracked or committed, 
but I cannot undo this.  I tried, for example,

git checkout -- github.com/alecthomas/gometalinter

I don't get an error message but it does not do anything.  The file is 
not changes, and git status show me the same information, ie, these 
files have changes not staged for commit.

I do not know how to restore these files to the state they were in in 
the repo, and to have my own git tree not to flag this as an unstaged 
alteration.  Running rm -rfv on the repos on my computer, then running 
go get to restore them does not change git status. It still sahs changes 
not stated for commit: modified.

This happens for the above 3 tree items.

How do I restore these to the github remote repository condition and not 
have my own git tree mark these as changed?

--rob solomon


```

## Adrian H, 2019-04-21 05:03

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <CAP_kE8XaFW=G1f_qrS2sEp+ELQ9otk=j0-ZtbF1dATQX8ZjrAA@mail.gmail.com>
URL: https://gitlist.dev/e/CAP_kE8XaFW%3DG1f_qrS2sEp%2BELQ9otk%3Dj0-ZtbF1dATQX8ZjrAA%40mail.gmail.com
In-Reply-To: <cb1f725f-1314-d320-104a-726ef1c906fa@fastmail.com>

```
If I understand the commands you are using correctly, you are
referencing the remote repo.  You need to reference the local repo.
So try using the following commands:

git checkout -- alecthomas/gometalinter
git checkout -- kisielk/errcheck
git checkout -- rogpeppe/godef

Or if those are the only files that have been modified, then you can
use the following single command:

git reset --hard

and that will reset all files that have not been staged.

HTH


A


On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>
> I have my own code at a github repository, using Go.  Part of using Go
> libraries not part of the official Go people is by using a system they
> call go get.  This essentially uses git to, well, go get source code.
> Mine are at github.com and golang.org.  My computer runs LinuxMint 19.1.
>
> I used goland IDE from jetbrains to run go fmt on my entire project.
> Now I am getting this message that I cannot get rid of:
>
> changes not staged for commit:
>
>    modified: github.com/alecthomas/gometalinter (modified content)
>
>    modified: github.com/kisielk/errcheck (modified content)
>
>    modified: github.com/rogpeppe/godef (modified content)
>
>
> I do not want any changes to central repos to be tracked or committed,
> but I cannot undo this.  I tried, for example,
>
> git checkout -- github.com/alecthomas/gometalinter
>
> I don't get an error message but it does not do anything.  The file is
> not changes, and git status show me the same information, ie, these
> files have changes not staged for commit.
>
> I do not know how to restore these files to the state they were in in
> the repo, and to have my own git tree not to flag this as an unstaged
> alteration.  Running rm -rfv on the repos on my computer, then running
> go get to restore them does not change git status. It still sahs changes
> not stated for commit: modified.
>
> This happens for the above 3 tree items.
>
> How do I restore these to the github remote repository condition and not
> have my own git tree mark these as changed?
>
> --rob solomon
>


-- 
========================================
            Adrian Hawryluk
         BSc. Computer Science
----------------------------------------
           Specialising in:
        OOD Methodologies in UML
  OOP Methodologies in C, C++ and more
        RT Embedded Programming
            GUI Development
========================================

```

## rob, 2019-04-21 12:34

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <b0a8d228-78c5-a355-1ded-dc2904d8216e@fastmail.com>
URL: https://gitlist.dev/e/b0a8d228-78c5-a355-1ded-dc2904d8216e%40fastmail.com
In-Reply-To: <CAP_kE8XaFW=G1f_qrS2sEp+ELQ9otk=j0-ZtbF1dATQX8ZjrAA@mail.gmail.com>

```
didn't work.  I did not get any error messages, just didn't work.  After 
I did

   git reset --hard

   git status

I see the same 3 files that say changes not staged for commit: modified 
and it lists the same 3 files.

--rob


On 4/21/19 1:03 AM, Adrian H wrote:
> If I understand the commands you are using correctly, you are
> referencing the remote repo.  You need to reference the local repo.
> So try using the following commands:
>
> git checkout -- alecthomas/gometalinter
> git checkout -- kisielk/errcheck
> git checkout -- rogpeppe/godef
>
> Or if those are the only files that have been modified, then you can
> use the following single command:
>
> git reset --hard
>
> and that will reset all files that have not been staged.
>
> HTH
>
>
> A
>
>
> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>> I have my own code at a github repository, using Go.  Part of using Go
>> libraries not part of the official Go people is by using a system they
>> call go get.  This essentially uses git to, well, go get source code.
>> Mine are at github.com and golang.org.  My computer runs LinuxMint 19.1.
>>
>> I used goland IDE from jetbrains to run go fmt on my entire project.
>> Now I am getting this message that I cannot get rid of:
>>
>> changes not staged for commit:
>>
>>     modified: github.com/alecthomas/gometalinter (modified content)
>>
>>     modified: github.com/kisielk/errcheck (modified content)
>>
>>     modified: github.com/rogpeppe/godef (modified content)
>>
>>
>> I do not want any changes to central repos to be tracked or committed,
>> but I cannot undo this.  I tried, for example,
>>
>> git checkout -- github.com/alecthomas/gometalinter
>>
>> I don't get an error message but it does not do anything.  The file is
>> not changes, and git status show me the same information, ie, these
>> files have changes not staged for commit.
>>
>> I do not know how to restore these files to the state they were in in
>> the repo, and to have my own git tree not to flag this as an unstaged
>> alteration.  Running rm -rfv on the repos on my computer, then running
>> go get to restore them does not change git status. It still sahs changes
>> not stated for commit: modified.
>>
>> This happens for the above 3 tree items.
>>
>> How do I restore these to the github remote repository condition and not
>> have my own git tree mark these as changed?
>>
>> --rob solomon
>>
>

```

## Philip Oakley, 2019-04-21 13:03

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <4b388e60-703d-8ac3-ef74-211924374249@iee.org>
URL: https://gitlist.dev/e/4b388e60-703d-8ac3-ef74-211924374249%40iee.org
In-Reply-To: <b0a8d228-78c5-a355-1ded-dc2904d8216e@fastmail.com>

```
Hi Rob,

On 21/04/2019 13:34, rob wrote:
> didn't work.  I did not get any error messages, just didn't work.  
> After I did
>
>   git reset --hard
>
>   git status
>
> I see the same 3 files that say changes not staged for commit: 
> modified and it lists the same 3 files.
Could this be that the file timestamps are being changed in the 
background and git is detecting those timestamp changes, even when there 
is no change to the files.
- Just as thought.

(In-line posting is preferred, so as to see the replies in context)
Philip

>
> --rob
>
>
> On 4/21/19 1:03 AM, Adrian H wrote:
>> If I understand the commands you are using correctly, you are
>> referencing the remote repo.  You need to reference the local repo.
>> So try using the following commands:
>>
>> git checkout -- alecthomas/gometalinter
>> git checkout -- kisielk/errcheck
>> git checkout -- rogpeppe/godef
>>
>> Or if those are the only files that have been modified, then you can
>> use the following single command:
>>
>> git reset --hard
>>
>> and that will reset all files that have not been staged.
>>
>> HTH
>>
>>
>> A
>>
>>
>> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>>> I have my own code at a github repository, using Go.  Part of using Go
>>> libraries not part of the official Go people is by using a system they
>>> call go get.  This essentially uses git to, well, go get source code.
>>> Mine are at github.com and golang.org.  My computer runs LinuxMint 
>>> 19.1.
>>>
>>> I used goland IDE from jetbrains to run go fmt on my entire project.
>>> Now I am getting this message that I cannot get rid of:
>>>
>>> changes not staged for commit:
>>>
>>>     modified: github.com/alecthomas/gometalinter (modified content)
>>>
>>>     modified: github.com/kisielk/errcheck (modified content)
>>>
>>>     modified: github.com/rogpeppe/godef (modified content)
>>>
>>>
>>> I do not want any changes to central repos to be tracked or committed,
>>> but I cannot undo this.  I tried, for example,
>>>
>>> git checkout -- github.com/alecthomas/gometalinter
>>>
>>> I don't get an error message but it does not do anything.  The file is
>>> not changes, and git status show me the same information, ie, these
>>> files have changes not staged for commit.
>>>
>>> I do not know how to restore these files to the state they were in in
>>> the repo, and to have my own git tree not to flag this as an unstaged
>>> alteration.  Running rm -rfv on the repos on my computer, then running
>>> go get to restore them does not change git status. It still sahs 
>>> changes
>>> not stated for commit: modified.
>>>
>>> This happens for the above 3 tree items.
>>>
>>> How do I restore these to the github remote repository condition and 
>>> not
>>> have my own git tree mark these as changed?
>>>
>>> --rob solomon
>>>
>>


```

## Andreas Schwab, 2019-04-21 13:14

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <87pnpfwlej.fsf@igel.home>
URL: https://gitlist.dev/e/87pnpfwlej.fsf%40igel.home
In-Reply-To: <cb1f725f-1314-d320-104a-726ef1c906fa@fastmail.com>

```
On Apr 20 2019, rob <drrob100@fastmail.com> wrote:

> changes not staged for commit:
>
>   modified: github.com/alecthomas/gometalinter (modified content)
>
>   modified: github.com/kisielk/errcheck (modified content)
>
>   modified: github.com/rogpeppe/godef (modified content)

You have submodules with modified content.  If you want to keep them you
need to create commits in each modified submodule, then add them to the
superproject and commit there.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

```

## rob, 2019-04-21 17:07

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <b05fee72-5536-65d5-1237-f4e5c83db9e8@fastmail.com>
URL: https://gitlist.dev/e/b05fee72-5536-65d5-1237-f4e5c83db9e8%40fastmail.com
In-Reply-To: <4b388e60-703d-8ac3-ef74-211924374249@iee.org>

```
possibly.  What do I do about that?

--rob


On 4/21/19 9:03 AM, Philip Oakley wrote:
> Hi Rob,
>
> On 21/04/2019 13:34, rob wrote:
>> didn't work.  I did not get any error messages, just didn't work.  
>> After I did
>>
>>   git reset --hard
>>
>>   git status
>>
>> I see the same 3 files that say changes not staged for commit: 
>> modified and it lists the same 3 files.
> Could this be that the file timestamps are being changed in the 
> background and git is detecting those timestamp changes, even when 
> there is no change to the files.
> - Just as thought.
>
> (In-line posting is preferred, so as to see the replies in context)
> Philip
>
>>
>> --rob
>>
>>
>> On 4/21/19 1:03 AM, Adrian H wrote:
>>> If I understand the commands you are using correctly, you are
>>> referencing the remote repo.  You need to reference the local repo.
>>> So try using the following commands:
>>>
>>> git checkout -- alecthomas/gometalinter
>>> git checkout -- kisielk/errcheck
>>> git checkout -- rogpeppe/godef
>>>
>>> Or if those are the only files that have been modified, then you can
>>> use the following single command:
>>>
>>> git reset --hard
>>>
>>> and that will reset all files that have not been staged.
>>>
>>> HTH
>>>
>>>
>>> A
>>>
>>>
>>> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>>>> I have my own code at a github repository, using Go.  Part of using Go
>>>> libraries not part of the official Go people is by using a system they
>>>> call go get.  This essentially uses git to, well, go get source code.
>>>> Mine are at github.com and golang.org.  My computer runs LinuxMint 
>>>> 19.1.
>>>>
>>>> I used goland IDE from jetbrains to run go fmt on my entire project.
>>>> Now I am getting this message that I cannot get rid of:
>>>>
>>>> changes not staged for commit:
>>>>
>>>>     modified: github.com/alecthomas/gometalinter (modified content)
>>>>
>>>>     modified: github.com/kisielk/errcheck (modified content)
>>>>
>>>>     modified: github.com/rogpeppe/godef (modified content)
>>>>
>>>>
>>>> I do not want any changes to central repos to be tracked or committed,
>>>> but I cannot undo this.  I tried, for example,
>>>>
>>>> git checkout -- github.com/alecthomas/gometalinter
>>>>
>>>> I don't get an error message but it does not do anything. The file is
>>>> not changes, and git status show me the same information, ie, these
>>>> files have changes not staged for commit.
>>>>
>>>> I do not know how to restore these files to the state they were in in
>>>> the repo, and to have my own git tree not to flag this as an unstaged
>>>> alteration.  Running rm -rfv on the repos on my computer, then running
>>>> go get to restore them does not change git status. It still sahs 
>>>> changes
>>>> not stated for commit: modified.
>>>>
>>>> This happens for the above 3 tree items.
>>>>
>>>> How do I restore these to the github remote repository condition 
>>>> and not
>>>> have my own git tree mark these as changed?
>>>>
>>>> --rob solomon
>>>>
>>>
>

```

## Philip Oakley, 2019-04-21 17:22

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <2f3dc6f3-cd6a-7079-d81f-66c101c98a64@iee.org>
URL: https://gitlist.dev/e/2f3dc6f3-cd6a-7079-d81f-66c101c98a64%40iee.org
In-Reply-To: <b05fee72-5536-65d5-1237-f4e5c83db9e8@fastmail.com>

```
On 21/04/2019 18:07, rob wrote:
> possibly. What do I do about that?
>
> --rob
>
see below.
>
> On 4/21/19 9:03 AM, Philip Oakley wrote:
>> Hi Rob,
>>
>> On 21/04/2019 13:34, rob wrote:
>>> didn't work.  I did not get any error messages, just didn't work.  
>>> After I did
>>>
>>>   git reset --hard
>>>
>>>   git status
>>>
>>> I see the same 3 files that say changes not staged for commit: 
>>> modified and it lists the same 3 files.
>> Could this be that the file timestamps are being changed in the 
>> background and git is detecting those timestamp changes, even when 
>> there is no change to the files.
>> - Just as thought.
>>
>> (In-line posting is preferred, so as to see the replies in context)
>> Philip
>>
If it is that, Try
core.trustctime::
     If false, the ctime differences between the index and the
     working tree are ignored; useful when the inode change time
     is regularly modified by something outside Git (file system
     crawlers and some backup systems).
     See linkgit:git-update-index[1]. True by default.

Or,
core.checkStat::
     When missing or is set to `default`, many fields in the stat
     structure are checked to detect if a file has been modified
     since Git looked at it.  When this configuration variable is
     set to `minimal`, sub-second part of mtime and ctime, the
     uid and gid of the owner of the file, the inode number (and
     the device number, if Git was compiled to use it), are
     excluded from the check among these fields, leaving only the
     whole-second part of mtime (and ctime, if `core.trustCtime`
     is set) and the filesize to be checked.
>>>
>>> --rob
>>>
>>>
>>> On 4/21/19 1:03 AM, Adrian H wrote:
>>>> If I understand the commands you are using correctly, you are
>>>> referencing the remote repo.  You need to reference the local repo.
>>>> So try using the following commands:
>>>>
>>>> git checkout -- alecthomas/gometalinter
>>>> git checkout -- kisielk/errcheck
>>>> git checkout -- rogpeppe/godef
>>>>
>>>> Or if those are the only files that have been modified, then you can
>>>> use the following single command:
>>>>
>>>> git reset --hard
>>>>
>>>> and that will reset all files that have not been staged.
>>>>
>>>> HTH
>>>>
>>>>
>>>> A
>>>>
>>>>
>>>> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>>>>> I have my own code at a github repository, using Go.  Part of 
>>>>> using Go
>>>>> libraries not part of the official Go people is by using a system 
>>>>> they
>>>>> call go get.  This essentially uses git to, well, go get source code.
>>>>> Mine are at github.com and golang.org.  My computer runs LinuxMint 
>>>>> 19.1.
>>>>>
>>>>> I used goland IDE from jetbrains to run go fmt on my entire project.
>>>>> Now I am getting this message that I cannot get rid of:
>>>>>
>>>>> changes not staged for commit:
>>>>>
>>>>>     modified: github.com/alecthomas/gometalinter (modified content)
>>>>>
>>>>>     modified: github.com/kisielk/errcheck (modified content)
>>>>>
>>>>>     modified: github.com/rogpeppe/godef (modified content)
>>>>>
>>>>>
>>>>> I do not want any changes to central repos to be tracked or 
>>>>> committed,
>>>>> but I cannot undo this.  I tried, for example,
>>>>>
>>>>> git checkout -- github.com/alecthomas/gometalinter
>>>>>
>>>>> I don't get an error message but it does not do anything. The file is
>>>>> not changes, and git status show me the same information, ie, these
>>>>> files have changes not staged for commit.
>>>>>
>>>>> I do not know how to restore these files to the state they were in in
>>>>> the repo, and to have my own git tree not to flag this as an unstaged
>>>>> alteration.  Running rm -rfv on the repos on my computer, then 
>>>>> running
>>>>> go get to restore them does not change git status. It still sahs 
>>>>> changes
>>>>> not stated for commit: modified.
>>>>>
>>>>> This happens for the above 3 tree items.
>>>>>
>>>>> How do I restore these to the github remote repository condition 
>>>>> and not
>>>>> have my own git tree mark these as changed?
>>>>>
>>>>> --rob solomon
>>>>>
>>>>
>>


```

## rob, 2019-04-21 18:53

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <6811c1cf-201c-3881-9d46-533d251ba3ce@fastmail.com>
URL: https://gitlist.dev/e/6811c1cf-201c-3881-9d46-533d251ba3ce%40fastmail.com
In-Reply-To: <2f3dc6f3-cd6a-7079-d81f-66c101c98a64@iee.org>

```
I did

   git config --global core.trustctime false

   git config --global core.checkStat minimal

No difference

-rob

On 4/21/19 1:22 PM, Philip Oakley wrote:
> On 21/04/2019 18:07, rob wrote:
>> possibly. What do I do about that?
>>
>> --rob
>>
> see below.
>>
>> On 4/21/19 9:03 AM, Philip Oakley wrote:
>>> Hi Rob,
>>>
>>> On 21/04/2019 13:34, rob wrote:
>>>> didn't work.  I did not get any error messages, just didn't work.  
>>>> After I did
>>>>
>>>>   git reset --hard
>>>>
>>>>   git status
>>>>
>>>> I see the same 3 files that say changes not staged for commit: 
>>>> modified and it lists the same 3 files.
>>> Could this be that the file timestamps are being changed in the 
>>> background and git is detecting those timestamp changes, even when 
>>> there is no change to the files.
>>> - Just as thought.
>>>
>>> (In-line posting is preferred, so as to see the replies in context)
>>> Philip
>>>
> If it is that, Try
> core.trustctime::
>     If false, the ctime differences between the index and the
>     working tree are ignored; useful when the inode change time
>     is regularly modified by something outside Git (file system
>     crawlers and some backup systems).
>     See linkgit:git-update-index[1]. True by default.
>
> Or,
> core.checkStat::
>     When missing or is set to `default`, many fields in the stat
>     structure are checked to detect if a file has been modified
>     since Git looked at it.  When this configuration variable is
>     set to `minimal`, sub-second part of mtime and ctime, the
>     uid and gid of the owner of the file, the inode number (and
>     the device number, if Git was compiled to use it), are
>     excluded from the check among these fields, leaving only the
>     whole-second part of mtime (and ctime, if `core.trustCtime`
>     is set) and the filesize to be checked.
>>>>
>>>> --rob
>>>>
>>>>
>>>> On 4/21/19 1:03 AM, Adrian H wrote:
>>>>> If I understand the commands you are using correctly, you are
>>>>> referencing the remote repo.  You need to reference the local repo.
>>>>> So try using the following commands:
>>>>>
>>>>> git checkout -- alecthomas/gometalinter
>>>>> git checkout -- kisielk/errcheck
>>>>> git checkout -- rogpeppe/godef
>>>>>
>>>>> Or if those are the only files that have been modified, then you can
>>>>> use the following single command:
>>>>>
>>>>> git reset --hard
>>>>>
>>>>> and that will reset all files that have not been staged.
>>>>>
>>>>> HTH
>>>>>
>>>>>
>>>>> A
>>>>>
>>>>>
>>>>> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>>>>>> I have my own code at a github repository, using Go.  Part of 
>>>>>> using Go
>>>>>> libraries not part of the official Go people is by using a system 
>>>>>> they
>>>>>> call go get.  This essentially uses git to, well, go get source 
>>>>>> code.
>>>>>> Mine are at github.com and golang.org.  My computer runs 
>>>>>> LinuxMint 19.1.
>>>>>>
>>>>>> I used goland IDE from jetbrains to run go fmt on my entire project.
>>>>>> Now I am getting this message that I cannot get rid of:
>>>>>>
>>>>>> changes not staged for commit:
>>>>>>
>>>>>>     modified: github.com/alecthomas/gometalinter (modified content)
>>>>>>
>>>>>>     modified: github.com/kisielk/errcheck (modified content)
>>>>>>
>>>>>>     modified: github.com/rogpeppe/godef (modified content)
>>>>>>
>>>>>>
>>>>>> I do not want any changes to central repos to be tracked or 
>>>>>> committed,
>>>>>> but I cannot undo this.  I tried, for example,
>>>>>>
>>>>>> git checkout -- github.com/alecthomas/gometalinter
>>>>>>
>>>>>> I don't get an error message but it does not do anything. The 
>>>>>> file is
>>>>>> not changes, and git status show me the same information, ie, these
>>>>>> files have changes not staged for commit.
>>>>>>
>>>>>> I do not know how to restore these files to the state they were 
>>>>>> in in
>>>>>> the repo, and to have my own git tree not to flag this as an 
>>>>>> unstaged
>>>>>> alteration.  Running rm -rfv on the repos on my computer, then 
>>>>>> running
>>>>>> go get to restore them does not change git status. It still sahs 
>>>>>> changes
>>>>>> not stated for commit: modified.
>>>>>>
>>>>>> This happens for the above 3 tree items.
>>>>>>
>>>>>> How do I restore these to the github remote repository condition 
>>>>>> and not
>>>>>> have my own git tree mark these as changed?
>>>>>>
>>>>>> --rob solomon
>>>>>>
>>>>>
>>>
>

```

## rob, 2019-04-21 21:18

Subject: Re: I messed up my own git tree and I don't know how to fix it.
Message-ID: <6c98c228-2587-bf69-454b-83199a434014@fastmail.com>
URL: https://gitlist.dev/e/6c98c228-2587-bf69-454b-83199a434014%40fastmail.com
In-Reply-To: <6811c1cf-201c-3881-9d46-533d251ba3ce@fastmail.com>

```
I got it to do what I want.  I have alias nuke='rm -rfv'

So I did

     nuke github.com/alecthomas/gometalinter (modified content)

     nuke github.com/kisielk/errcheck (modified content)

     nuke github.com/rogpeppe/godef (modified content)

     git rm github.com/alecthomas/gometalinter (modified content)

     git rm github.com/kisielk/errcheck (modified content)

     git rm github.com/rogpeppe/godef (modified content)

     git commit the rm operation.

     go get github.com/alecthomas/gometalinter (modified content)

     go get github.com/kisielk/errcheck (modified content)

     go get github.com/rogpeppe/godef (modified content)

     git add these, then git commit.

And my directories are clean when I git status them.

I could not figure out anything else to do.

--rob

On 4/21/19 2:53 PM, rob wrote:
> I did
>
>   git config --global core.trustctime false
>
>   git config --global core.checkStat minimal
>
> No difference
>
> -rob
>
> On 4/21/19 1:22 PM, Philip Oakley wrote:
>> On 21/04/2019 18:07, rob wrote:
>>> possibly. What do I do about that?
>>>
>>> --rob
>>>
>> see below.
>>>
>>> On 4/21/19 9:03 AM, Philip Oakley wrote:
>>>> Hi Rob,
>>>>
>>>> On 21/04/2019 13:34, rob wrote:
>>>>> didn't work.  I did not get any error messages, just didn't work.  
>>>>> After I did
>>>>>
>>>>>   git reset --hard
>>>>>
>>>>>   git status
>>>>>
>>>>> I see the same 3 files that say changes not staged for commit: 
>>>>> modified and it lists the same 3 files.
>>>> Could this be that the file timestamps are being changed in the 
>>>> background and git is detecting those timestamp changes, even when 
>>>> there is no change to the files.
>>>> - Just as thought.
>>>>
>>>> (In-line posting is preferred, so as to see the replies in context)
>>>> Philip
>>>>
>> If it is that, Try
>> core.trustctime::
>>     If false, the ctime differences between the index and the
>>     working tree are ignored; useful when the inode change time
>>     is regularly modified by something outside Git (file system
>>     crawlers and some backup systems).
>>     See linkgit:git-update-index[1]. True by default.
>>
>> Or,
>> core.checkStat::
>>     When missing or is set to `default`, many fields in the stat
>>     structure are checked to detect if a file has been modified
>>     since Git looked at it.  When this configuration variable is
>>     set to `minimal`, sub-second part of mtime and ctime, the
>>     uid and gid of the owner of the file, the inode number (and
>>     the device number, if Git was compiled to use it), are
>>     excluded from the check among these fields, leaving only the
>>     whole-second part of mtime (and ctime, if `core.trustCtime`
>>     is set) and the filesize to be checked.
>>>>>
>>>>> --rob
>>>>>
>>>>>
>>>>> On 4/21/19 1:03 AM, Adrian H wrote:
>>>>>> If I understand the commands you are using correctly, you are
>>>>>> referencing the remote repo.  You need to reference the local repo.
>>>>>> So try using the following commands:
>>>>>>
>>>>>> git checkout -- alecthomas/gometalinter
>>>>>> git checkout -- kisielk/errcheck
>>>>>> git checkout -- rogpeppe/godef
>>>>>>
>>>>>> Or if those are the only files that have been modified, then you can
>>>>>> use the following single command:
>>>>>>
>>>>>> git reset --hard
>>>>>>
>>>>>> and that will reset all files that have not been staged.
>>>>>>
>>>>>> HTH
>>>>>>
>>>>>>
>>>>>> A
>>>>>>
>>>>>>
>>>>>> On Sat, Apr 20, 2019 at 11:22 PM rob <drrob100@fastmail.com> wrote:
>>>>>>> I have my own code at a github repository, using Go.  Part of 
>>>>>>> using Go
>>>>>>> libraries not part of the official Go people is by using a 
>>>>>>> system they
>>>>>>> call go get.  This essentially uses git to, well, go get source 
>>>>>>> code.
>>>>>>> Mine are at github.com and golang.org.  My computer runs 
>>>>>>> LinuxMint 19.1.
>>>>>>>
>>>>>>> I used goland IDE from jetbrains to run go fmt on my entire 
>>>>>>> project.
>>>>>>> Now I am getting this message that I cannot get rid of:
>>>>>>>
>>>>>>> changes not staged for commit:
>>>>>>>
>>>>>>>     modified: github.com/alecthomas/gometalinter (modified content)
>>>>>>>
>>>>>>>     modified: github.com/kisielk/errcheck (modified content)
>>>>>>>
>>>>>>>     modified: github.com/rogpeppe/godef (modified content)
>>>>>>>
>>>>>>>
>>>>>>> I do not want any changes to central repos to be tracked or 
>>>>>>> committed,
>>>>>>> but I cannot undo this.  I tried, for example,
>>>>>>>
>>>>>>> git checkout -- github.com/alecthomas/gometalinter
>>>>>>>
>>>>>>> I don't get an error message but it does not do anything. The 
>>>>>>> file is
>>>>>>> not changes, and git status show me the same information, ie, these
>>>>>>> files have changes not staged for commit.
>>>>>>>
>>>>>>> I do not know how to restore these files to the state they were 
>>>>>>> in in
>>>>>>> the repo, and to have my own git tree not to flag this as an 
>>>>>>> unstaged
>>>>>>> alteration.  Running rm -rfv on the repos on my computer, then 
>>>>>>> running
>>>>>>> go get to restore them does not change git status. It still sahs 
>>>>>>> changes
>>>>>>> not stated for commit: modified.
>>>>>>>
>>>>>>> This happens for the above 3 tree items.
>>>>>>>
>>>>>>> How do I restore these to the github remote repository condition 
>>>>>>> and not
>>>>>>> have my own git tree mark these as changed?
>>>>>>>
>>>>>>> --rob solomon
>>>>>>>
>>>>>>
>>>>
>>

```
