vs设置git 忽略文件

摘要:
在代码目录中创建.gitgnore文件:Git忽略,配置要忽略的文件或文件夹,然后将其提交给Git。如果文件已被跟踪并推送到远程,请删除本地文件并将其提交到远程。Gitrm-r-cached.gitadd。gitcommit-m“update.gitgnore”官方网站。gitgonre文件内容https://github.com/github/gitignore/blob/master/VisualStudio.gitignore##IgnoreVisualStudiotemporaryfiles、buildresults和由公共VisualStudio插件生成的##文件####获取最新信息fromhttps://github.com/github/gitignore/blob/master/VisualStudio.gitignore#User-specificfiles*.rsuser*.suo*.user*.userosscache*.sln.docstates#用户特定文件*。userprefs#单自动生成文件no_崩溃。*#生成结果[Dd]ebug/[Dd]debgPublic/[Rr]elease/[Rr]elease/x64/x86/[Ww][Ii][Nn]32/[Aa][Rr][Mm]/[Aa][Rr][Mm]64/bld/[Bb]in/[Oo]bj/[Ll]og/[Ll]og/Microsoft.VisualStudio.2015/2017cache/optionsdirectory。vs/#在wwwroot#wwwroot/#Microsoft.VisualStudio.2017autogeneratedfilesGeneratedFiles/#MSTesttestResults[Tt]est[Rr]esult*/[Bb]build[Ll]og.*#NUnit*.VisualState.xmlTestResults.xmlnunit-*中未提及您有创建项目静态文件的任务。xml#BuildResultsofAATLProject[Dd]ebugPS/[Rr]eleasePS/dldata.c#BenchmarkResultsBenchmarkDotNet.Artifacts/#.NETCoreprroject.lock.jsonproject.frage.lock.jsonatifacts/#ASP.NETScaffoldingCaffoldingReadMe.txt#StyleCompStyleReport。xml#文件构建Microsoft.VisualStudio.*.i.c*.p.c*.h.h*.ilk*.meta*.obj*.iobj*.pch*.pdb*.ipdb*.pgc*.pgd*.rsp*.sbr*.tlb*.tli*.tlh*.tmp*。tmp-proj*wpftmp.csproj*.log*.vspscc*.vssscc.builds*.pidb*.svclog*。scc#ChutzpahTestfiles_Chutzpah*#VisualC++cachefilesipch/*.aps*.ncb*.opendb*.opensdf*.sdf*.cachefile*.VC.db*.VC.VC.opendb#Microsoft.VisualStudio.profiler*.psess*.vsp*.vsp*.sap#Microsoft.VisualStudio.TraceFiles*.e2e#TFS2012LocalWorkspace$tf/#GuidanceAutomationToolkit*.gpState#ReSharperia。NETcodingadd-in_ ReSharper*/*.[Rr]e[Ss]harper*.DotSettings。user#TeamCityisabuildadd-in_ TeamCity*#DotCoverisaCodeCoverageTool*.dotCover#AxoCoverisaCodeCoverageTool.axoCover/*!

在代码目录下建立.gitignore文件: .gitignore ,配置上要忽略的文件或者文件夹,然后提交到git 上就可以了。

如果文件已经被跟踪且被推送到远程,把本地这些文件删除再提交到远端。

git rm -r --cached .
git add .
git commit -m "update .gitignore"

 官方.gitigonre 文件内容  https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

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

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

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

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# 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
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# 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
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# CodeRush personal settings
.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

  

免责声明:文章转载自《vs设置git 忽略文件》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Nginx配置反向代理Latex 引用为名字+序号下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

使用VSCode创建Asp.Net Core

前言 .Net Core 2.0已经发布几个月了,惭愧!身为一个开发人员现在才开始接触,有人说有VS这一宇宙第一IDE在,为啥还要用VSCode,为啥?因为我们是程序猿啊!我们是攻城狮啊!我们爱折腾啊,在非windows下体验编译net的那种兴奋刺激的感觉,就像刚接触编程时第一个HelloWorld输出在电脑屏幕时的那种感觉,爽!看看我大net也能跑在li...

WPF学习笔记二 WPF命中测试

概述: WPF中的Canvas是常用的一个绘图控件,可以方便地在Canvas中添加我们需要处理的各种元素如:图片、文字等。但Canvas中元素增加到一定数量,并且有重合的时候,我们如何通过在Canvas中点击鼠标,获得我们想要的元素,然后再对该元素做出相应的控制? 命中测试,可以很好地解决这个问题 本文目的: 使用命中测试,选取Canvas中相应Ele...

Ant基础

一 Ant 介绍 Ant是构建工具,用来实现软件的自动化的构建,类似于VisualStudio的project文件,Linux上构建C++的makefile,Ant通常用来构建Java程序。 Ant是基于XML的文件,所以更容易阅读;Ant是用Java实现的,本身支持跨平台;Ant基于插件的方式开发,本身内置了常用的大部分的插件,而且第三方的扩展也很容易...

使用visual studio code调试php代码

这回使用visual studio code折腾php代码的调试,又是一顿折腾,无论如何都进不了断点。好在就要放弃使用visual studio code工具的时候,折腾好了,汗~ 这里把步骤记录下来: 1、安装一站式php工具wampserver 我安装的是最新的3.1.3 64bit的版本,这个版本内置了4个版本的php,默认使用的是php 5.6.3...

Visual Studio 查看宏展开

使用Visual Studio 开发c++项目,中遇到项目中宏定义套宏定义,难以阅读源代码的时候。 可在 项目--》右键--》配置属性--》c/c++ --》预处理器 --》预处理到文件,选择 是(/P) 预处理取消显示行号,选择 是(/EP) 然后,在解决方案管理器中选择,需要查看的cpp文件,右键选择 编译。 完成后,在项目文件夹下可以找到对应cpp...

导入Android Studio 项目报 invalid gradle jdk configuration found

转自:http://blog.csdn.net/pdskyzcc1/article/details/48521667 从Git.oschina.com上clone下来代码后,直接Android Studio open,而不是用import的方式,Android Studio 不识别,因为缺少.iml配置文件。 这时不要慌,用import的方法再次打开项目...