前提
VSCODE上でgit pull origin mainを実行したら、gitignoreしていたファイルがローカルのワークツリーから消えました。
実現したいこと
pullしてもgitignoreしているファイルが消えないようにしたいです。
ディレクトリ構造とgitignore
│ .cache
│ .gitignore
│ app.py
│ requirements.txt
│
├─static
│ └─css
│ style.css
│
├─templates
│ │ base.html
│ │ index.html
│ │ result.html
│ │ success.html
│ │
│ └─img
│ empty.png
│
└─__pycache__
app.cpython-310.pyc
gitignore
1# directory 2__pycache__ 3venv 4 5# file 6.env 7.cache 8
補足情報(FW/ツールのバージョンなど)
gitignoreが反映されずキャッシュ削除をしたり、GitHub上でファイルを消したり、強制プッシュしたりしたため、履歴がめちゃくちゃかもしれません。
回答1件
あなたの回答
tips
プレビュー