簡體   English   中英

git無法識別exe文件

[英]git does not recognize exe file

我想將NuGet.exe上傳到github,但所有exe文件都沒有列在我的本地存儲庫中。

大約兩周前我在另一個項目NuGet.exe上傳了NuGet.exe文件,但現在我根本無法上傳任何exe文件。 我沒有特別定義的全局.gitignore

下面的代碼是我的.gitignore文件。 我錯過了什么?

# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/

# mstest test results
TestResults

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder 
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
packages

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

# Windows-specific files
Thumbs.db
desktop.ini
# Mac-specific things (thanks to Michael Aaron Safyan)
.DS_Store

- 編輯 -

.nuget/目錄.config.targets文件下的相同文件得到了很好的處理。 我可以檢查git ls-files --others -i --exclude-standard給出NuGet.exe被忽略,但我不知道是哪個規則。

首先,您可以使用git check-ignore文件是否在本地被git check-ignore

git check-ignore -v -- yourFile

其次,您可以強制添加該文件(繞過任何忽略規則):

git add -f yourFile

我剛剛把!NuGet.exe放在.gitignore文件中,對我來說非常適合

我使用Windows UI在Windows中使用TortoiseGit,導航到該文件夾​​,右鍵單擊並直接添加.exe文件。 這些添加的文件出現在SourceTree中,我從那里提交了它們。

暫無
暫無

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

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