IT story

가장 일반적인 SVN은 패턴을 무시합니까?

hot-time 2020. 5. 24. 11:00
반응형

가장 일반적인 SVN은 패턴을 무시합니까?


사용하기에 가장 좋은 일반적인 SVN 무시 패턴은 무엇입니까?

여러 다른 IDE, 편집기, 컴파일러, 플러그인, 플랫폼 등의 특정 파일과 "오버랩"되는 일부 파일 유형이 있습니다 (즉, 일부 유형 프로젝트에는 바람직하지만 다른 유형에는 적합하지 않음).

그러나 개발 환경의 특정 사항에 관계없이 소스 제어에 자동으로 포함시키지 않으려는 수많은 파일 유형이 있습니다.

이 질문에 대한 답은 모든 프로젝트에 좋은 출발점이 될 것입니다. 필요한 몇 가지 환경 관련 항목 만 추가하면됩니다. 다른 버전 제어 시스템 (VCS)에도 적용 할 수 있습니다.


이 질문에 2 센트를 추가하겠습니다 :

Windows 및 Linux 플랫폼 모두에서 네이티브 C ++, C # / VB.NET 및 PERL 프로젝트에 TortoiseSVN 및 Subversion CLI와 함께 다음 SVN 무시 패턴을 사용합니다. 그것은 나를 위해 잘 작동합니다!

복사하여 붙여 넣기를위한 형식 :

* .o * .lo * .la # * #. *. rej * .rej. * ~ * ~. # * .DS_Store thumbs.db Thumbs.db * .bak * .class * .exe * .dll * .mine * .obj * .ncb * .lib * .log * .idb * .pdb * .ilk * .msi * .res * .pch * .suo * .exp *. * ~ *. ~ * ~ *. * cvs CVS .CVS .cvs 릴리스 릴리스 디버그 디버그 무시 bin Bin 무시 * .csproj.user * .user * .generated.cs

가독성을위한 형식 :

* .o * .lo * .la # * #. *. rej * .rej
. * ~ * ~. # * .DS_Store thumbs.db 
Thumbs.db * .bak * .class * .exe * .dll
* .mine * .obj * .ncb * .lib * .log 
* .idb * .pdb * .ilk * .msi * .res * .pch * .suo 
* .exp *. * ~ *. ~ * ~ *. * cvs CVS .CVS .cvs  
릴리스 릴리스 디버그 디버그
Bin Bin obj Obj 무시
* .csproj.user * .user
* .generated.cs

Burly의 무시 패턴에 따라 ReSharper를 무시 목록에 추가했습니다.

복사하여 붙여 넣기를위한 형식 :

*.o *.lo .la ## .*.rej .rej .~ ~ .# .DS_Store thumbs.db Thumbs.db *.bak *.class *.exe *.dll *.mine *.obj *.ncb *.lib *.log *.idb *.pdb *.ilk .msi .res *.pch *.suo *.exp ~. cvs CVS .CVS .cvs release Release debug Debug ignore Ignore bin Bin obj Obj *.csproj.user *.user _ReSharper.* *.resharper.user

가독성을위한 형식 :

*.o *.lo .la ## .*.rej .rej .~ ~ .# .DS_Store thumbs.db Thumbs.db *.bak
*.class *.exe *.dll *.mine *.obj *.ncb *.lib *.log *.idb *.pdb *.ilk .msi .res *.pch *.suo *.exp ~. cvs
CVS .CVS .cvs release Release debug
Debug ignore Ignore bin Bin obj Obj
*.csproj.user *.user _ReSharper.* *.resharper.user

Visual Studio의 무시 패턴 :

* / bin * / obj * / 릴리스 * / Debug * .suo * .err * .log * .obj * .bin * .dll * .exe * .LOG * .user * .pdb [tT] emp [tT] empPE Ankh.Load thumbs.db * .resharper * .vspscc * .vsssccc * .scc * / _ ReSharper * * / _ ReSharper. * bin obj * .resharperoptions * .db * .bak * _ReSharper * * .snk 로그 출력 테스트 결과 * .crunchsolution . * * .crunchproject. *

가독성을위한 형식

* / bin * / obj * / 릴리스 * / Debug * .suo * .err * .log * .obj * .bin * .dll * .exe 
* .LOG * .user * .pdb [tT] emp [tT] empPE Ankh.로드 thumbs.db * .resharper 
* .vspscc * .vsssccc * .scc * / _ ReSharper * * / _ ReSharper. * bin obj 
* .resharperoptions * .db * .bak * _ReSharper * * .snk는 출력 결과를 기록합니다 
* .crunchsolution. * * .crunchproject. *

일반적으로 저장소에서 원하지 않는 파일을 발견 할 때마다 패턴을 업데이트합니다. "최상의"패턴은 없다고 생각합니다. 항상 개발 하는 언어와 환경에 따라 다릅니다 .

또한, 모든 "무시할 수있는"파일 유형을 생각할 가능성은 거의 없습니다. 단순히 포함하지 않은 파일 유형을 항상 보게됩니다. 따라서 패턴을 업데이트하는 것이 가장 효과적입니다.


Windows 사용자는 desktop.ini 및 thumbs.db를 던질 수 있습니다.


내 Visual Studio 프로젝트에 사용

*/bin */obj *.user *.suo

거기에서 더 많은 파일 형식을 확장 할 수 있습니다.


Visual Studio (VC ++) 사용자는 반드시 .ncb 파일 을 제외해야 합니다.


Mac 사용자는 아마도 .DS_Store에 넣기를 원할 것입니다. 또한 Emacs 또는 Vim을 사용하는 개발자가 있다면 ~ ~와 # # 을 추가하고 싶을 것입니다 .


Eclipse의 경우 다음을 사용합니다.

bin
.*

. *는 모든 프로젝트 구성을 가져옵니다. '숨겨진'디렉토리 나 파일을 거의 체크인하지 않으려 고하는데, 계속 나타나면 svn 추가 ​​할 수 있습니다.


프로젝트의 일부로 타사 라이브러리와 dll을 사용하고 있기 때문에 저장소에서 * .lib 및 * .dll을 차단하는 지혜가 보이지 않습니다. 이것들은 저장소에 저장되는 것입니다.


Visual Studio 2010 사용자는 ipch(C ++ 사전 컴파일 된 헤더가 포함 된 폴더) 및 *.sdf(모든 종류의 프로젝트에 대해 인텔리전스가 사용하는 거대한 파일 )을 추가해야합니다 .


패턴은 사용중인 운영 체제에 따라 다릅니다.

On Linux, you'll want to block **.o*, **.so*, **.a*, and **.la* to begin with. You may also want to block **~* (backup file from editing) and #*# (emacs backup from a crash).

On Windows, you'll want **.obj*, **.lib*, and **.dll* at the very least.

Any other files you need to block depend on your IDE, editor, and compiler.


Gotta add Resharper to the mix if you use one.

another one to look out for is Ankh*.*


Don't forget NCrunch temporary files:

*.crunchsolution.* *.crunchproject.*

And core dumps (cygwin, linux)

*.stackdump core.*

gitignore.io provides configurable patterns for git. They provide a readable list, which you need to reformat for SVN.

For instance, requesting MicrosoftOffice and Windows returns

# Created by https://www.gitignore.io/api/microsoftoffice,windows

### MicrosoftOffice ###
*.tmp

# Word temporary
~$*.doc*

# Excel temporary
~$*.xls*

# Excel Backup File
*.xlk

# PowerPoint temporary
~$*.ppt*

# Visio autosave temporary files
*.~vsdx


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

gitignore.io provides configurable patterns for git. They provide a readable list, which you need to reformat for SVN.

For instance, requesting MicrosoftOffice and Windows returns

# Created by https://www.gitignore.io/api/microsoftoffice,windows

### MicrosoftOffice ###
*.tmp

# Word temporary
~$*.doc*

# Excel temporary
~$*.xls*

# Excel Backup File
*.xlk

# PowerPoint temporary
~$*.ppt*

# Visio autosave temporary files
*.~vsdx


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

It seems that it can be directly used as svn:global-ignore

참고URL : https://stackoverflow.com/questions/85353/best-general-svn-ignore-pattern

반응형