How can I avoid `git checkout -b` marking git LFS files as modified?

git-lfs
Tags: #<Tag:0x00007f7f78625210>

(Michael Wood-Vasey) #1

When I git checkout -b newbranch from a repository using git lfs, suddenly all of my files that were being tracked by LFS are now listed as modified and that they’re going to be converted from LFS to git.

What is the correct thing to use to do a git checkout -b newbranch without the LFS tracked files getting marked as modified?

[wmwv@lsst-dev01 validation_data_decam]$ git lfs status
On branch tickets/DM-13204

Git LFS objects to be committed:

	astrometry_net_data/sdss-dr9-fink-v5b_and_398_0.fits (LFS: 62de588 -> Git: 62de588)
	astrometry_net_data/sdss-dr9-fink-v5b_and_398_1.fits (LFS: ff2de80 -> Git: ff2de80)
	astrometry_net_data/sdss-dr9-fink-v5b_and_398_2.fits (LFS: 1dc85fe -> Git: 1dc85fe)
	data/0176837/bkgd/bkgd-0176837_10.fits (LFS: 5ec3a6c -> Git: 5ec3a6c)
	data/0176837/bkgd/bkgd-0176837_11.fits (LFS: e20e678 -> Git: e20e678)
	data/0176837/bkgd/bkgd-0176837_12.fits (LFS: 02e6364 -> Git: 02e6364)
[...]

Specifically this is for validation_data_decam. The contents of .gitattributes are:

*.fits filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.fz filter=lfs diff=lfs merge=lfs -text

(Michael Wood-Vasey) #2

Solution?

I re-ran git lfs install, and then a git checkout -b didn’t created this list of modified files?

Is git lfs install something I should just re periodically to keep up with git lfs updates?


(Jonathan Sick) #3

We changed the Git LFS API server on Monday and maybe that tripped something up with older clients. Do you think this could have been it @jmatt / @josh? Do we need to review our minimum client version requirements?


(josh) #4

@jsick The running git-lfs server code should not have changed.

@mwv Could you provide the git/git-lfs versions your using? Eg.

git --version
git-lfs version

(Michael Wood-Vasey) #5
[wmwv@lsst-dev01 ~]$ git --version
git version 1.9.4
[wmwv@lsst-dev01 ~]$ git lfs version
git-lfs/2.3.4 (GitHub; linux amd64; go 1.9.1; git d2f6752f)