簡體   English   中英

Git提交更改視頻文件

[英]Git commit change video file

當我提交並推送更改時,我的MP4和視頻文件會發生變化。 我在MAC和WIN上試過這個,兩者都是一樣的。 我的遠程存儲庫是BitBucked,但問題位於我的本地存儲庫中。

例如,當提交大約4MB的文件時,存儲庫中的文件比原始文件小60個字節。 我調查了一下,有些0D丟失了。

這聽起來像CRLF,LF轉換,但經過實驗
core.autocrlf params,沒有任何改變。

我缺少一些配置嗎?

UPDATE

以下是文件:原文: https//drive.google.com/open?id = 0B-30m3j9bgwrcUN0OEdiT2lid28

當我從BB下載它時: https//drive.google.com/open? id = 0B- 30m3j9bgwrOXN0NVBLTzhHTGM

這是.gitattributes

# All text files should have the "lf" (Unix) line endings
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.java text
*.js text
*.css text
*.html text

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.jar binary
*.pdf binary
*.eot binary
*.ttf binary
*.gzip binary
*.gz binary
*.ai binary
*.eps binary
*.swf binary

您需要設置的主要配置是:

git config --global core.autocrlf false

然后再次克隆你的BitBucket回購。

這樣,您將避免對所有文件進行自動eol轉換。

如果仍需要對某些文件進行eol轉換,請在.gitattributes文件中設置core.eol指令

我補充道

*.mp4 binary

到.gitattribute

現在它有效!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM