Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

node_modules以下を大量に git add してしまった場合の覚書

More than 1 year has passed since last update.

くっそ基本的なことだけど...

.gitignore ファイル作成

中身に

node_module/

てだけ書いてsave
コミットしたくないファイルは .gitignoreに書いていく

アンステージ処理

git rm -r --cached node_modules  

でステージにあげてしまったnode_modules以下をアンステージ出来る

最後に.gitignoreファイルをコミットして終了

git add .
git commit 
Kintech
筋トレ×Technology = 筋Tech
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away