git status is not showing my changed files
up vote
0
down vote
favorite
I have a Node.js project and have imported a few Node modules. The git_status
command shows the files that I changed in the project. I have also changed some files under the node_modules
directory but those are not shown. The node_modules
directory is shown as untracked.
Untracked files:
(use "git add <file>..." to include in what will be committed)
node_modules/
src/js/main-release-paths.json
I have changed only one file in node_modules
:
node_modules/@oracle/grunt-oraclejet/node_modules/@oracle/oraclejet-tooling/lib/serve/connect.js
How can I track this file?
node.js git github node-modules
add a comment |
up vote
0
down vote
favorite
I have a Node.js project and have imported a few Node modules. The git_status
command shows the files that I changed in the project. I have also changed some files under the node_modules
directory but those are not shown. The node_modules
directory is shown as untracked.
Untracked files:
(use "git add <file>..." to include in what will be committed)
node_modules/
src/js/main-release-paths.json
I have changed only one file in node_modules
:
node_modules/@oracle/grunt-oraclejet/node_modules/@oracle/oraclejet-tooling/lib/serve/connect.js
How can I track this file?
node.js git github node-modules
I really don't understand the question...
– OznOg
Nov 11 at 15:49
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a Node.js project and have imported a few Node modules. The git_status
command shows the files that I changed in the project. I have also changed some files under the node_modules
directory but those are not shown. The node_modules
directory is shown as untracked.
Untracked files:
(use "git add <file>..." to include in what will be committed)
node_modules/
src/js/main-release-paths.json
I have changed only one file in node_modules
:
node_modules/@oracle/grunt-oraclejet/node_modules/@oracle/oraclejet-tooling/lib/serve/connect.js
How can I track this file?
node.js git github node-modules
I have a Node.js project and have imported a few Node modules. The git_status
command shows the files that I changed in the project. I have also changed some files under the node_modules
directory but those are not shown. The node_modules
directory is shown as untracked.
Untracked files:
(use "git add <file>..." to include in what will be committed)
node_modules/
src/js/main-release-paths.json
I have changed only one file in node_modules
:
node_modules/@oracle/grunt-oraclejet/node_modules/@oracle/oraclejet-tooling/lib/serve/connect.js
How can I track this file?
node.js git github node-modules
node.js git github node-modules
edited Nov 11 at 20:00
Adam Liss
40.4k1193130
40.4k1193130
asked Nov 11 at 15:45
Chirayu Chirayu
156
156
I really don't understand the question...
– OznOg
Nov 11 at 15:49
add a comment |
I really don't understand the question...
– OznOg
Nov 11 at 15:49
I really don't understand the question...
– OznOg
Nov 11 at 15:49
I really don't understand the question...
– OznOg
Nov 11 at 15:49
add a comment |
5 Answers
5
active
oldest
votes
up vote
1
down vote
Assuming you have git repo, Please check the .gitignore files inside your project. Entries in .gitignore will be ignored by Git and will not show up when you do git add.
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
add a comment |
up vote
1
down vote
You shouldn't add the node_modules
folder to git then it's managed bei the npm
command. So remove that folder and use the npm install
command.
When you have added something in that folder it's shown as changed, if you had first added some files. So i hop that folder is in your .gitignore
file and ignored. You should check that.
add a comment |
up vote
0
down vote
Adding the file to track
This is most likely not a suitable approach (read below). However , if you really want to do it:
In order to track a file nested under node_modules
, you should add
the directory. All of its content will be staged in git
git add node_modules
Recommended approach
You probably don't want to track the contents of node_modules
directory, because:
- running
npm install
will wipe your your changes - hundreds or thousand files are likely to end up present in that directory
- tracking
package.json
andpackage-lock.json
in git is sufficient, then populate node_modules usingnpm install
command.
You are not supposed to modify files located in node_modules
directory directly. Instead, fork the module in question, modify it, and:
- either publish your own version in npm
- or reference it as a git repository inside package.json (how-to)
Then, also add node_modules
directory to the .gitignore
file.
add a comment |
up vote
0
down vote
If the whole directory is untracked, git status
will show only the directory. Because it's untracked, there is no meaningful difference to git between changed and unchanged files in there.
Other answers have already addressed that tracking node_modules
is nota good idea. Of you want to track your changes to modules, consider cloning the module repo and including it as a git submodule.
add a comment |
up vote
0
down vote
It should be inside .gitignore file. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
add a comment |
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Assuming you have git repo, Please check the .gitignore files inside your project. Entries in .gitignore will be ignored by Git and will not show up when you do git add.
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
add a comment |
up vote
1
down vote
Assuming you have git repo, Please check the .gitignore files inside your project. Entries in .gitignore will be ignored by Git and will not show up when you do git add.
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
add a comment |
up vote
1
down vote
up vote
1
down vote
Assuming you have git repo, Please check the .gitignore files inside your project. Entries in .gitignore will be ignored by Git and will not show up when you do git add.
Assuming you have git repo, Please check the .gitignore files inside your project. Entries in .gitignore will be ignored by Git and will not show up when you do git add.
answered Nov 11 at 15:53
dresh
284814
284814
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
add a comment |
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
1
1
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
... But the asker does see it in git status so it obviously is not ignored.
– ohlec
Nov 11 at 16:10
add a comment |
up vote
1
down vote
You shouldn't add the node_modules
folder to git then it's managed bei the npm
command. So remove that folder and use the npm install
command.
When you have added something in that folder it's shown as changed, if you had first added some files. So i hop that folder is in your .gitignore
file and ignored. You should check that.
add a comment |
up vote
1
down vote
You shouldn't add the node_modules
folder to git then it's managed bei the npm
command. So remove that folder and use the npm install
command.
When you have added something in that folder it's shown as changed, if you had first added some files. So i hop that folder is in your .gitignore
file and ignored. You should check that.
add a comment |
up vote
1
down vote
up vote
1
down vote
You shouldn't add the node_modules
folder to git then it's managed bei the npm
command. So remove that folder and use the npm install
command.
When you have added something in that folder it's shown as changed, if you had first added some files. So i hop that folder is in your .gitignore
file and ignored. You should check that.
You shouldn't add the node_modules
folder to git then it's managed bei the npm
command. So remove that folder and use the npm install
command.
When you have added something in that folder it's shown as changed, if you had first added some files. So i hop that folder is in your .gitignore
file and ignored. You should check that.
answered Nov 11 at 15:54
Stony
19.7k135164
19.7k135164
add a comment |
add a comment |
up vote
0
down vote
Adding the file to track
This is most likely not a suitable approach (read below). However , if you really want to do it:
In order to track a file nested under node_modules
, you should add
the directory. All of its content will be staged in git
git add node_modules
Recommended approach
You probably don't want to track the contents of node_modules
directory, because:
- running
npm install
will wipe your your changes - hundreds or thousand files are likely to end up present in that directory
- tracking
package.json
andpackage-lock.json
in git is sufficient, then populate node_modules usingnpm install
command.
You are not supposed to modify files located in node_modules
directory directly. Instead, fork the module in question, modify it, and:
- either publish your own version in npm
- or reference it as a git repository inside package.json (how-to)
Then, also add node_modules
directory to the .gitignore
file.
add a comment |
up vote
0
down vote
Adding the file to track
This is most likely not a suitable approach (read below). However , if you really want to do it:
In order to track a file nested under node_modules
, you should add
the directory. All of its content will be staged in git
git add node_modules
Recommended approach
You probably don't want to track the contents of node_modules
directory, because:
- running
npm install
will wipe your your changes - hundreds or thousand files are likely to end up present in that directory
- tracking
package.json
andpackage-lock.json
in git is sufficient, then populate node_modules usingnpm install
command.
You are not supposed to modify files located in node_modules
directory directly. Instead, fork the module in question, modify it, and:
- either publish your own version in npm
- or reference it as a git repository inside package.json (how-to)
Then, also add node_modules
directory to the .gitignore
file.
add a comment |
up vote
0
down vote
up vote
0
down vote
Adding the file to track
This is most likely not a suitable approach (read below). However , if you really want to do it:
In order to track a file nested under node_modules
, you should add
the directory. All of its content will be staged in git
git add node_modules
Recommended approach
You probably don't want to track the contents of node_modules
directory, because:
- running
npm install
will wipe your your changes - hundreds or thousand files are likely to end up present in that directory
- tracking
package.json
andpackage-lock.json
in git is sufficient, then populate node_modules usingnpm install
command.
You are not supposed to modify files located in node_modules
directory directly. Instead, fork the module in question, modify it, and:
- either publish your own version in npm
- or reference it as a git repository inside package.json (how-to)
Then, also add node_modules
directory to the .gitignore
file.
Adding the file to track
This is most likely not a suitable approach (read below). However , if you really want to do it:
In order to track a file nested under node_modules
, you should add
the directory. All of its content will be staged in git
git add node_modules
Recommended approach
You probably don't want to track the contents of node_modules
directory, because:
- running
npm install
will wipe your your changes - hundreds or thousand files are likely to end up present in that directory
- tracking
package.json
andpackage-lock.json
in git is sufficient, then populate node_modules usingnpm install
command.
You are not supposed to modify files located in node_modules
directory directly. Instead, fork the module in question, modify it, and:
- either publish your own version in npm
- or reference it as a git repository inside package.json (how-to)
Then, also add node_modules
directory to the .gitignore
file.
answered Nov 11 at 15:57
Mehdi
3,29711833
3,29711833
add a comment |
add a comment |
up vote
0
down vote
If the whole directory is untracked, git status
will show only the directory. Because it's untracked, there is no meaningful difference to git between changed and unchanged files in there.
Other answers have already addressed that tracking node_modules
is nota good idea. Of you want to track your changes to modules, consider cloning the module repo and including it as a git submodule.
add a comment |
up vote
0
down vote
If the whole directory is untracked, git status
will show only the directory. Because it's untracked, there is no meaningful difference to git between changed and unchanged files in there.
Other answers have already addressed that tracking node_modules
is nota good idea. Of you want to track your changes to modules, consider cloning the module repo and including it as a git submodule.
add a comment |
up vote
0
down vote
up vote
0
down vote
If the whole directory is untracked, git status
will show only the directory. Because it's untracked, there is no meaningful difference to git between changed and unchanged files in there.
Other answers have already addressed that tracking node_modules
is nota good idea. Of you want to track your changes to modules, consider cloning the module repo and including it as a git submodule.
If the whole directory is untracked, git status
will show only the directory. Because it's untracked, there is no meaningful difference to git between changed and unchanged files in there.
Other answers have already addressed that tracking node_modules
is nota good idea. Of you want to track your changes to modules, consider cloning the module repo and including it as a git submodule.
answered Nov 11 at 16:09
ohlec
1,710717
1,710717
add a comment |
add a comment |
up vote
0
down vote
It should be inside .gitignore file. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
add a comment |
up vote
0
down vote
It should be inside .gitignore file. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
add a comment |
up vote
0
down vote
up vote
0
down vote
It should be inside .gitignore file. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
It should be inside .gitignore file. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
answered Nov 12 at 13:17
Jithin Babu
215
215
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250383%2fgit-status-is-not-showing-my-changed-files%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I really don't understand the question...
– OznOg
Nov 11 at 15:49