---
title: "Discussion on \"How to remove Node Modules from GitHub repository\" | Hashnode"
description: "Discussion on \"How to remove Node Modules from GitHub repository\". make .gitignore file.\n\nadd node_modules/ line to gitignore file\n\nFollow those command\n\n\ngit rm -r --cached . git add . git commit -m \"remove nodeModules files (by sameerkali)\" git push -f"
url: "https://hashnode.com/posts/how-to-remove-node-modules-from-github-repository/650d6689b8e18bd86425372a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to remove Node Modules from GitHub repository](https://sameerkali.hashnode.dev/how-to-remove-node-modules-from-github-repository?utm_source=hashnode&utm_medium=feed)

make .gitignore file. add node\_modules/ line to gitignore file Follow those command git rm -r --cached . git add . git commit -m "remove nodeModules files (by sameerkali)" git push -f

Sep 22, 2023 · 1 min read · sameerkali.hashnode.dev  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#github](https://hashnode.com/tag/github)
-   [#npm](https://hashnode.com/tag/npm)
-   [#git-github-version-control-linux-git-commands-github-repositories-cheat-sheet-git-branching-git-workflow-collaboration-git-history-git-commit-git-merge-git-rebase-git-pull-request-git-fork-git-stash-git-remote-git-ignore-git-hooks-github-issues-github-actions-github-pages-github-security-git-for-beginners-advanced-git-techniques-github-collaboration-git-integration-git-flow-git-best-practices](https://hashnode.com/tag/git-github-version-control-linux-git-commands-github-repositories-cheat-sheet-git-branching-git-workflow-collaboration-git-history-git-commit-git-merge-git-rebase-git-pull-request-git-fork-git-stash-git-remote-git-ignore-git-hooks-github-issues-github-actions-github-pages-github-security-git-for-beginners-advanced-git-techniques-github-collaboration-git-integration-git-flow-git-best-practices)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Sameer Faridi](https://hashnode.com/@SameerKali)

@SameerKali

  
[View profile](https://hashnode.com/@SameerKali)

Writing about mistakes || Best practices in Web Development.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
