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
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 `
}