ProgramingTip

충돌을 최소화하기 위해 Subversion에서 어떤 Visual Studio 파일을 무시해야합니까?

bestdevel 2020. 10. 23. 08:10
반응형

충돌을 최소화하기 위해 Subversion에서 어떤 Visual Studio 파일을 무시해야합니까?


저는 Subversion을 사용하여 작업을 관리하는 여러 .Net 개발자를 지원하고 Visual Studio가 프로젝트를 관리하고 추가 버전을 수행하는 데 사용하는 파일을 중심으로 표시되는 여러 문제에 직면 해 있습니다. 특히 적절한 파일은 이미 저장소에 사실로 인해 충돌을 발생합니다. 나는 꺼내는 방법과 방법을 다루는 방법을 선택하고 "그들"이 먼저 무엇인지 알아야합니다.

그래서 Subversion이 무시할 수있는 파일 / 디렉토리는 무엇이며 무시할 수 있습니까? (일명 파일은 무엇을입니까?)

이 조직화되지 않은 것은 ASP.Net 사이트이며 사이트 배포를 통해 수행됩니다. svn 업데이트로 인해 IIS에서 파일이 변경 될 때 사이트를 동적으로 수행하기 위해 필요한 파일이 저장소에 남아 있어야합니다.


  • bin 및 obj 디렉토리
  • * .user 파일 (MyProject.csproj.user)
  • * .suo 파일

또한 Visual Studio 2015를 사용하는 경우 .vs 디렉터리입니다.


이 글로벌 무시 패턴으로 행운을 빕니다.

* bin * obj * suo * .user * .tmp * .TMP 
* resharper * * Resharper * * ReSharper * * .Load * .gpState 
Thumbs.db *. ~ m2

Resharper 플러그인을 실행 중 무시해도됩니다. ". ~ m2"는 데이터 모델러가 생성하는 임시 파일입니다.

업데이트 : 투표 해 주셔서 감사합니다. 최근에 Mac, Dreamweaver, Python 및 무시해야 할 몇 가지 Visual Studio 파일을 추가했습니다.

*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp
*[Bb]in *obj *suo *resharp* *.user *.tmp *.TMP *Resharper*
*ReSharper* *.Load *.gpState *.NoLoad  *.~m2 *.dbmdl _notes *.cache
[Tt]est[Rr]esult [Bb]uild[Ll]og.* *.[Pp]ublish.xml *.[Cc]ache [Tt]humbs.db lint.db
*.docstates .apdisk [Ll]ogs .DS_Store *.bak *.vs

누군가 실수로 무시해야하는 폴더 나 파일을 체크인 한 경우 SVN이 다시 무시하기 전에 저장소에서 파일을 수동으로 제거해야합니다. 이미 저장소에있는 파일이 무시 설정을 무시하기 때문입니다.


이전 표준이지만 여기 에있는 GitHub의 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
*.suo
*.user
*.userosscache
*.sln.docstates
*.vcxproj.filters

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

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

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

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

# NUNIT
*.VisualState.xml
TestResult.xml

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

# DNX
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.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

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

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

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# 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
# TODO: 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
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable 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

# 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
node_modules/
orleans.codegen.cs

# 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

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

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

# 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/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

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

# Cake - Uncomment if you are using it
# tools/


  • *. 큰 상자
  • * .obj
  • * .exe
  • * .dll
  • * .pch
  • *. 사용자
  • * .suo
  • * .tlb
  • TestResults (VSTS 단위 테스트 디렉토리)

  • 'bin'디렉토리는 좋은 시작입니다 (@Kevin이 말했듯이).
  • 'obj'디렉토리도 무시하는 것이 좋습니다.
  • * .suo 및 * .user는 소스 제어에서 제외하는 것이 가장 좋습니다.
  • * .VisualState.xml도 개인적인 선택이 될 것입니다.
  • TestResults.xml (NUnit을 사용하는 경우)

더 나은 질문은 " Subversion에 어떤 파일을 추가해야합니까? "라고 생각합니다.

AnkhSVN 2.0 Subversion 통합은 솔루션의 모든 프로젝트에 정확히이 질문을합니다. (이 질문은 SCC 사양의 핵심 부분 중 하나입니다.) 그러면 이러한 파일을 추가하는 것이 좋습니다.

사용자는 다른 파일을 수동으로 추가 할 수 있지만 (또는 제안 된 일부 파일을 무시 된 것으로 표시)이 동작을 통해 올바른 작업 을 수행하기가 매우 쉽습니다 .

대부분의 다른 Subversion 클라이언트는 추가해야 할 것과 추가하지 말아야 할 것을 정말로 이해하는 시스템과 대화 할 수있는 사치가 없습니다. (예 : TortoiseSVN과 같은 외부 클라이언트 및 프런트 엔드는 파일 확장자를 기반으로 추측 할 수 있습니다.)


내 TortoiseSVN 전역 무시는 다음과 같습니다.

*.suo *.resharper *.sln bin obj *.user *.suo Debug Release *.pdb test.* _ReSharper*.* *.scc *.vssscc *.vspscc

Microsoft Visual SourceSafe에서 전환 할 때 마지막 3 개의 도움말입니다.


AnkhSVN 은 프로젝트에 필요한 파일 만 체크인하는 훌륭한 작업을 수행합니다.


나는 아마도 bin 디렉토리에서 아무 말도 할 것입니다.


사람들이 위에서 제안한 것 외에도 Resharper가 내가 작업하는 코드와 동일한 폴더에 .cache 파일을 저장하는 것을 좋아한다는 것을 알지 못하기 때문에 * .cache 를 자주 무시 해야합니다. 또한 아직 * .pdb를 언급 한 사람이 없다고 생각합니다.


.SDF 파일도 체크인하지 않습니다. 크기가 크며 누락 된 경우 Visual Studio에서 다시 만듭니다. 내가 아는 한 Intellisense에 사용되는 데이터베이스입니다.

참고 URL : https://stackoverflow.com/questions/588077/what-visual-studio-files-should-be-ignored-by-subversion-to-minimize-conflicts

반응형