我创build了一个新的节点项目,package.json没有上传到Git

我做了以下

 npm init

然后我将其添加到我的存储库。 通过

 git状态
 git add。
 git commit -m“初始提交”
 git推送起源大师

现在我访问我的回购,我的package.json那里。 难道我做错了什么?

我有一个gitignore它看起来像下面

 # Logs logs *.log # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directory # Commenting this out is preferred by some people, see # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- node_modules # Users Environment Variables .lock-wscript 

  git status 

揭示了以下内容

 On branch master Untracked files: (use "git add <file>..." to include in what will be committed) .DS_Store nothing added to commit but untracked files present (use "git add" to track) 

的package.json

 { "name": "FXTrader", "version": "1.0.0", "description": "A web application to show data about Foreign Currency.", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "https://github.com/username/FXTrader" }, "author": "Me MySelf", "license": "NONE", "bugs": { "url": "https://github.com/username/FXTrader/issues" }, "homepage": "https://github.com/username/FXTrader" }