2017-11-12 10 views
-2

Windows git에서 디렉토리를 무시할 수 없습니다. 이 파일을 다운로드했습니다 : - https://gist.github.com/kmorcinek/2710267. 하지만 여전히 모든 시간 I는 다음을 참조하십시오 -이windows .gitignore가 visual studio temporatry 파일을 무시하지 않습니다.

enter image description here

그것은 .vs/디렉토리 아래에있는 수정을 불평하지 않아야합니다. 나는 다음과 같이 I가 올바른 위치에 .gitignore 파일을 추가 확신 -

enter image description here

내 .gitignore 파일 : - 잘못된 어떻게

# Download this file using PowerShell v3 under Windows with the following comand: 
    # Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore 
    # or wget: 
    # wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore 

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

    # Build results 

       [Dd]ebug/
       [Rr]elease/
       x64/
       build/
       [Bb]in/ 
       [Oo]bj/

    # 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 

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

    *_i.c 
    * _p.c 
    *.ilk 
    *.meta 
    *.obj 
    *.pch 
    *.pdb 
    *.pgc 
    *.pgd 
    *.rsp 
    *.sbr 
    *.tlb 
    *.tli 
    *.tlh 
    *.tmp 
    *.tmp_proj 
    *.log 
    *.vspscc 
    *.vssscc 
    .builds 
    *.pidb 
    *.log 
    *.scc 

    # OS generated files # 
    .DS_Store * 
    Icon ? 

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

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

    # Guidance Automation Toolkit 
    *.gpState 

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

    # TeamCity is a build add-in 
    _TeamCity * 

    # DotCover is a Code Coverage Tool 
    *.dotCover 

    # 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 

    # Windows Azure Build Output 
    csx 
    *.build.csdef 

    # Windows Store app package directory 
    AppPackages/ 

    # Others 
    *.Cache 
    ClientBin/ 
    [Ss]tyle[Cc]op.* 
    ~$* 
    *~ 
    *.dbmdl 
    *.[Pp]ublish.xml 
    *.pfx 
    *.publishsettings 
    modulesbin/ 
    tempbin/ 

    # EPiServer Site file (VPP) 
    AppData/ 

    # 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 

    # vim 
    *.txt~ 
    *.swp 
    *.swo 

    # svn 
    .svn 

    # Remainings from resolvings conflicts in Source Control 
    *.orig 

    # SQL Server files 
    * */ App_Data/*.mdf 
    **/App_Data/*.ldf 
    **/App_Data/*.sdf 


    #LightSwitch generated files 
    GeneratedArtifacts/ 
    _Pvt_Extensions/ 
    ModelManifest.xml 

    # ========================= 
    # Windows detritus 
    # ========================= 

    # Windows image file caches 
    Thumbs.db 
    ehthumbs.db 

    # Folder config file 
    Desktop.ini 

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

    # Mac desktop service store files 
    .DS_Store 

    # SASS Compiler cache 
    .sass-cache 

    # Visual Studio 2014 CTP 
    **/*.sln.ide 

    # Visual Studio temp something 
    .vs/

    # VS 2015+ 
    *.vc.vc.opendb 
    *.vc.db 

    # Rider 
    .idea/

    # Output folder used by Webpack or other FE stuff 
    **/ node_modules/* 
    **/wwwroot/* 

    # SpecFlow specific 
    *.feature.cs 
    *.feature.xlsx.* 
    *.Specs_*.html 

    ##### 
    # End of core ignore list, below put you custom 'per project' settings (patterns or path) 
    ##### 

짓을합니까? .vs/ConsoleApp/v15/sqlite3/storage.ide가 수정 된 이유는 무엇입니까? Windows에서 파일 및 디렉토리를 무시하는 방법을 알려주십시오.

+0

이''.vs를 포함 .gitignore' 않습니다 ... 그래서, 난 당신이 두번째 가능성 가야한다 생각 최선을 다하고되어서는 안된다? – apalomer

+0

[Git 저장소에 이미 커밋 된 파일 무시] (https://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git- 저장소) – 1615903

답변

1

고전적인 오해.

.gitignore은 추적되지 않은 파일에 대해서만 작동하며 이미 커밋 한 파일 (추적중인 파일)에는 작동하지 않습니다. 당신이 목적에 커밋 경우,

  • 을 커밋 계속 :

    가 수행하려는 작업에 따라 다른 솔루션입니다.

  • 당신이 오류 때문에 그것을 커밋하지 않으려면 당신이 그것을 커밋 할 필요하지만, 변경 사항을 적용하지 않으려면, 사용, git rm --cached .vs/ConsoleApp/v15/sqlite3/storage.ide
  • 으로 추적 skip-worktree 기능 중지 : git update-index --skip-worktree <file>

.vs 폴더에 포함 된 파일의 대부분은`*