我正在尝试使用Windows 10上的git将1.2 10的tar文件提交/推送到Git lfs服务器
我用以下命令跟踪了tar扩展:
C:\FilepathTo\Folder> git lfs track '*.tar'运行git lfs track返回
Listing tracked patterns
Folder\'*.tar' (Folder\.gitattributes)我添加了.gitattributes文件
C:\FilepathTo\Folder> git add .gitattributes我添加了一个大文件
C:\FilepathTo\Folder> git add file.tar 然后确认正在使用跟踪该文件
C:\FilepathTo\Folder> git lfs status
On branch MyAwesomeBranch
Git LFS objects to be pushed to origin/MyAwesomeBranch:
Git LFS objects to be committed:
.gitattributes (Git: 136g1ea)
file.tar (Git: 567d1ed)
Git LFS objects not staged for commit:我提交了文件
C:\FilepathTo\Folder> git commit -m "foo"
[MyAwesomeBranch ecf9735] foo
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Folder/.gitattributes
create mode 100644 Folder/file.tar并检查是否正在跟踪该文件
C:\FilepathTo\Folder> git lfs track ls-files不返回任何内容。
我再次检查lfs状态,它没有被列为要推送的对象。
C:\FilepathTo\Folder> git lfs status
On branch MyAwesomeBranch
Git LFS objects to be pushed to origin/MyAwesomeBranch:
Git LFS objects to be committed:
Git LFS objects not staged for commit:不出所料,推送失败,返回
remote: error: File Folder/file.tar is 1229.43 MB; this exceeds GitHub Enterprise's file size limit of 100.00 MB我做错了什么?为什么暂存文件没有提交到git lfs?
发布于 2019-05-01 12:06:54
问题已解决。这个命令就是问题所在:
C:\FilepathTo\Folder> git lfs track '*.tar'我应该使用双引号,如下所示:
C:\FilepathTo\Folder> git lfs track "*.tar"解决了我的问题。
https://stackoverflow.com/questions/55931154
复制相似问题