Web lists-archives.com

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




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