之前把某個 Project 送進版控時,該 Solution 沒有 .gitignore 檔案,最近有新專案也放進該 Solution 內,build 時才發現為什麼會有 bin 資料夾內的 change 產生阿,把 .gitignore 建立後也還是會有,查資料發現檔案進入版控後,建立或修改 .gitignore 檔案,必須手動把檔案從版控內移除並 commit 才算真的移除
建立 .gitignore 檔案後,build 後 bin 資料夾內還是會有 change 出現
git rm --cached WindowsFormsApp2/bin/Debug/\*
git status
git commit -m "Remove Version Control"
再進行 build,bin 資料夾內就不會再有 change 出現啦
![[git] 檔案移除版控-1](https://farm1.staticflickr.com/910/41785957912_ea47c0c061_z.jpg)
![[git] 檔案移除版控-2](https://farm1.staticflickr.com/863/41786036852_a113500807_z.jpg)
![[git] 檔案移除版控-3](https://farm1.staticflickr.com/978/41785957392_58e97c45cd_z.jpg)
![[git] 檔案移除版控-4](https://farm1.staticflickr.com/868/41827804351_173e40fbbe_z.jpg)
沒有留言:
張貼留言