-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
File tracking not check necessary items before (git lfs require git file system and into git influence directory) , to prevent error I will hack some code for support this issue and I will show reproduce issue as below. ( I think it's like #200 but duplicate line of tracking file in my case)
System environments
git-lfs/0.5.1 (GitHub; darwin amd64; git 2.0.1; go 1.4.1) on Mac OS X : Yosemity 10.10.4
I woking in directory contain a testfile.png and use git lfs without git file system
$ git lfs track "testfile.png"
Tracking testfile.png.gitattributes was created and I looking into file
$ cat .gitattributes
testfile.png filter=lfs diff=lfs merge=lfs -crlfthen use git lfs track again
$ git lfs track "testfile.png"
Tracking testfile.pngand read it
$ cat .gitattributes
testfile.png filter=lfs diff=lfs merge=lfs -crlf
testfile.png filter=lfs diff=lfs merge=lfs -crlfIt seem like git lfs not check git file system before. but if git already in the directory it’s warnning user about file exits in git lfs system (.gitattributes).
create git file system
$ git init
Initialized empty Git repository in /Users/AorJoa/repository/test_check_git_exists/.git/git check tracking file before add any line
$ git lfs track "testfile.png"
testfile.png already supportedand file contains two line of tracking file
$ cat .gitattributes
testfile.png filter=lfs diff=lfs merge=lfs -crlf
testfile.png filter=lfs diff=lfs merge=lfs -crlf