我刚做了$ git status
并得到了这个
Untracked files:
(use "git add <file>..." to include in what will be committed)
bower_components/ng-cordova-oauth/
bower_components/ngCordova/
node_modules/bower/lib/commands/completion.js
node_modules/bower/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js
node_modules/bower/node_modules/chalk/node_modules/has-color/
node_modules/bower/node_modules/decompress-zip/node_modules/graceful-fs/
node_modules/bower/node_modules/fstream-ignore/node_modules/minimatch/.npmignore
node_modules/bower/node_modules/fstream-ignore/node_modules/minimatch/node_modules/
node_modules/bower/node_modules/fstream-ignore/node_modules/minimatch/test/
node_modules/bower/node_modules/fstream/node_modules/.bin/
node_modules/bower/node_modules/fstream/node_modules/graceful-fs/
node_modules/bower/node_modules/fstream/node_modules/mkdirp/
node_modules/bower/node_modules/glob/.npmignore
node_modules/bower/node_modules/glob/.travis.yml
node_modules/bower/node_modules/glob/examples/
node_modules/bower/node_modules/glob/node_modules/minimatch/.npmignore
node_modules/bower/node_modules/glob/node_modules/minimatch/node_modules/
node_modules/bower/node_modules/glob/node_modules/minimatch/test/
node_modules/bower/node_modules/glob/test/
node_modules/bower/node_modules/inquirer/node_modules/async/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/LICENCE
node_modules/bower/node_modules/inquirer/node_modules/cli-color/Makefile
node_modules/bower/node_modules/inquirer/node_modules/cli-color/lib/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/LICENCE
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/Makefile
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/lib/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Array/from.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Array/of.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Array/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Date/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Error/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Function/i.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Function/insert.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Function/k.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Function/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Function/remove.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Math/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Number/index.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Number/is-nan.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Number/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Number/to-int.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Number/to-uint.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/descriptor.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/diff.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/extend-deep.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/extend-properties.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/extend.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/is-list.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/map-to-array.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/reduce.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/to-plain-object.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/Object/values.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/RegExp/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/String/prototype/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/test/reserved.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/Makefile
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/lib/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/event-emitter/LICENCE
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/event-emitter/Makefile
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/event-emitter/lib/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/event-emitter/test/_id.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/event-emitter/test/core.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/next-tick/Makefile
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/next-tick/lib/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/node_modules/next-tick/test/
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/_base.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/ext/method.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/ext/profile.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/ext/resolvers.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/primitive.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/memoizee/test/regular.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/test/_xterm-colors.js
node_modules/bower/node_modules/inquirer/node_modules/cli-color/test/_xterm-match.js
node_modules/bower/node_modules/inquirer/node_modules/readline2/node_modules/strip-ansi/node_modules/
node_modules/bower/node_modules/insight/contributing.md
node_modules/bower/node_modules/insight/lib/insight.js
node_modules/bower/node_modules/insight/node_modules/configstore/
node_modules/bower/node_modules/insight/node_modules/lodash.debounce/node_modules/
node_modules/bower/node_modules/insight/node_modules/object-assign/object-assign.js
node_modules/bower/node_modules/insight/node_modules/request/
node_modules/bower/node_modules/lockfile/bar
node_modules/bower/node_modules/lockfile/foo
node_modules/bower/node_modules/mout/object/deepEquals.js
node_modules/bower/node_modules/mout/src/object/deepEquals.js
node_modules/bower/node_modules/osenv/
node_modules/bower/node_modules/promptly/.editorconfig
node_modules/bower/node_modules/q/CONTRIBUTING.md
node_modules/bower/node_modules/q/benchmark/
node_modules/bower/node_modules/request/dns-request.js
node_modules/bower/node_modules/request/lib/debug.js
node_modules/bower/node_modules/request/lib/getSafe.js
node_modules/bower/node_modules/request/lib/optional.js
node_modules/bower/node_modules/request/node_modules/form-data/node_modules/combined-stream/
node_modules/bower/node_modules/request/node_modules/hawk/node_modules/boom/Makefile
node_modules/bower/node_modules/request/node_modules/mime/
node_modules/bower/node_modules/request/node_modules/qs/.gitmodules
node_modules/bower/node_modules/rimraf/AUTHORS
node_modules/bower/node_modules/rimraf/test/
node_modules/bower/node_modules/stringify-object/stringify-object.js
node_modules/bower/node_modules/tar/
node_modules/bower/node_modules/tmp/LICENSE
node_modules/bower/node_modules/tmp/test/dir-sync-test.js
node_modules/bower/node_modules/tmp/test/file-sync-test.js
node_modules/bower/node_modules/tmp/test/graceful-sync.js
node_modules/bower/node_modules/tmp/test/keep-sync.js
node_modules/bower/node_modules/tmp/test/spawn-sync.js
node_modules/bower/node_modules/tmp/test/unsafe-sync.js
node_modules/bower/node_modules/update-notifier/contributing.md
node_modules/bower/node_modules/update-notifier/lib/
node_modules/bower/node_modules/update-notifier/node_modules/
node_modules/bower/templates/std/update-notice.std
node_modules/gulp-concat/.npmignore
node_modules/gulp-concat/.travis.yml
node_modules/gulp-concat/node_modules/
node_modules/gulp-concat/test/
node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/
node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/shorthand-notations.js
node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/empty-removal.js
node_modules/gulp-minify-css/node_modules/clean-css/lib/text/comments.js
node_modules/gulp-minify-css/node_modules/clean-css/lib/text/expressions.js
node_modules/gulp-minify-css/node_modules/clean-css/lib/text/free.js
node_modules/gulp-minify-css/node_modules/clean-css/lib/text/urls.js
node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/History.md
node_modules/gulp-minify-css/node_modules/clone/
node_modules/gulp-minify-css/node_modules/event-stream/
node_modules/gulp-rename/.editorconfig
node_modules/gulp-rename/.gitattributes
node_modules/gulp-rename/.jshintrc
node_modules/gulp-rename/.npmignore
node_modules/gulp-rename/.travis.yml
node_modules/gulp-rename/Gulpfile.js
node_modules/gulp-rename/LICENSE
node_modules/gulp-rename/test/
node_modules/gulp-sass/
node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js
node_modules/gulp-util/node_modules/chalk/node_modules/has-color/
node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js
node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/
node_modules/gulp-util/test/
node_modules/gulp/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js
node_modules/gulp/node_modules/chalk/node_modules/has-color/
node_modules/gulp/node_modules/liftoff/lib/valid_extensions.js
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/.jshintrc
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/.travis.yml
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/Gruntfile.js
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/.npmignore
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/.travis.yml
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/examples/
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/.npmignore
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/node_modules/
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/test/
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/test/
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/
node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/test/
node_modules/gulp/node_modules/liftoff/node_modules/minimist/
node_modules/gulp/node_modules/semver/foot.js
node_modules/gulp/node_modules/semver/head.js
node_modules/gulp/node_modules/vinyl-fs/.npmignore
node_modules/gulp/node_modules/vinyl-fs/.travis.yml
node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeBuffer.js
node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents.js
node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeDir.js
node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeStream.js
node_modules/gulp/node_modules/vinyl-fs/lib/src/bufferFile.js
node_modules/gulp/node_modules/vinyl-fs/lib/src/getContents.js
node_modules/gulp/node_modules/vinyl-fs/lib/src/readDir.js
node_modules/gulp/node_modules/vinyl-fs/lib/src/streamFile.js
node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/through2/
node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/
node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.npmignore
node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml
node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/
node_modules/gulp/node_modules/vinyl-fs/test/
platforms/ios/UrbanetApp/Plugins/cordova-plugin-inappbrowser/
platforms/ios/www/img/3004.jpg
platforms/ios/www/plugins/cordova-plugin-inappbrowser/
plugins/cordova-plugin-inappbrowser/
www/img/jarra.jpg
www/img/picnic.jpg
www/img/ur.jpg
www/img/vertigo.jpg
www/js/controllers/NewsCtrl.js
www/js/controllers/PromoDetailCtrl.js
www/js/services/PromoFactory.js
www/templates/tab-promo-detail.html
www/templates/tab-promotions.html
no changes added to commit (use "git add" and/or "git commit -a")
MacBook-Pro-de-MarceloRS:urbanet Marcelo$
我不知道这里发生了什么,但是,我怎么能一起添加这些文件呢?
答案 0 :(得分:3)
你不应该添加它们!其中大部分是使用bower
和npm
安装的,不应检入VCS。而是将它们添加到.gitignore
文件中:
node_modules
bower_components
platforms
plugins
之后,您应该看到更少的未跟踪文件并可以使用
添加它们git add .
答案 1 :(得分:1)
如果你真的想要添加这些文件,你可以
git add .
但是,您可能不希望添加所有这些文件,因为您不需要将它们与项目一起分发(因为这些文件通常由npm安装)。因此,您可能更愿意在.gitignore
文件中添加行
node_modules
bower_components
以便git status
的输出不再受这些文件的污染
答案 2 :(得分:1)
首先创建一个.gitignore
文件并在此文件中设置bower_components
和node_modules
,因为您不应将此目录添加到git(npm documentation,gitignore documentation )。
然后添加要添加到提交中的目录:
git add .gitignore www ...