New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lfs detection inconsistent when manually modify .gitattributes file #1848

Sanster opened this Issue Jan 10, 2017 · 4 comments


None yet
3 participants
Copy link

Sanster commented Jan 10, 2017

I meet a similar problem with #1057(which had been solved by #1104), the different between #1057 is I didn't use git lfs track to add files type tracked by lfs, I modify .gitattributes file manually. Following series of commands demonstrate the issue:

git init git-lfs-bug
cd git-lfs-bug
echo 0 > lfs.bin
git add lfs.bin
git commit -m "add binary file"
echo *.bin filter=lfs diff=lfs merge=lfs -text > .gitattributes
git add .gitattributes
git commit -m "track with lfs"
git status

After this series of commands, git status says the woking directory is clean. I can delete .gitattributes file and run git lfs track *.bin to make lfs.bin file identified as modified, but if useA just push the code to Github and userB clone the project, git status will tell userB lfs.bin file is modified even userB doesn't do anything after clone (Which I think is a little confused).

I clone the project descriped above with two git-lfs version.
For git-lfs/1.2.0 (GitHub; windows amd64; go 1.6.1; git 9bd3b8e), there aren't any error infos in clone progress.
For git-lfs/1.5.4 (GitHub; windows amd64; go 1.7.4; git 71b637f1),when clone finish, I see this:

Pointer file error: Unable to parse pointer at: "lfs.bin"

Git version:

  • git version

This comment has been minimized.

Copy link

technoweenie commented Jan 10, 2017

The only thing we can do is offer an extra command that does #1104, without modifying .gitattributes. Maybe git lfs track scan or something? But, that would require you to remember that command after modifying .gitattributes.


This comment has been minimized.

Copy link

ttaylorr commented Jan 10, 2017


This comment has been minimized.

Copy link

Sanster commented Jan 11, 2017

Thanks for the responses. Maybe this is not a problem, I have add this case to our team's Q&A page, and suggest always use git lfs track to add file type.

@technoweenie technoweenie added this to the v2.0.0 milestone Jan 11, 2017

@ttaylorr ttaylorr modified the milestones: v2.0.0, v2.1.0 Feb 21, 2017


This comment has been minimized.

Copy link

technoweenie commented Mar 21, 2017

Closing this in favor of #2065. Thanks for the suggestion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment