Is there a way to tell Dropbox not to upload a certain file? (Eclipse related)

后端 未结 5 947
遇见更好的自我
遇见更好的自我 2021-01-31 09:33

I am trying to sync a code project between two computers, one running Windows and the other running Ubuntu 12.04. I use Eclipse on both machines, but the .metadata fold

5条回答
  •  时光取名叫无心
    2021-01-31 10:05

    Here is a script that will sync dropbox ignore with .gitignore in current folder and subfolders on Windows using Powershell. It requires the git command line to be installed.

    Get-ChildItem -Recurse | `
    Where-Object { $_.Name -eq '.gitignore' } | `
    ForEach-Object { `
        Write-Host $_.DirectoryName; `
        Push-Location $_.DirectoryName; `
        git status --ignored --short | `
          Where-Object { $_.StartsWith('!! ') } | `
          ForEach-Object { `
              $ignore = $_.Split(' ')[1].Trim('/'); `
              Write-Host $ignore; `
              Set-Content -Path $ignore -Stream com.dropbox.ignored -Value 1 `
          }; `
        Pop-Location `
     }
    

提交回复
热议问题