git push 只有一个文件到 Heroku
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4759174/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git push only one file to Heroku
提问by andkjaer
Is it possile to only push one file to Heroku, instead off all changed files?
是否可以只将一个文件推送到 Heroku,而不是所有更改的文件?
Thanks...
谢谢...
采纳答案by jonescb
No. Git tracks content not files, so you push all or nothing.
If there are files that you don't want to ever push, add them to the .gitignore
file.
If you've already committed them however, you would still push them for that commit, but any later changes will be ignored.
不。Git 跟踪内容而不是文件,所以你要么全部推送要么全都不推送。
如果有您不想推送的.gitignore
文件,请将它们添加到文件中。但是,如果您已经提交了它们,您仍然会为该提交推送它们,但任何以后的更改都将被忽略。
回答by sanon
If you commit only that one file then it is the only one that will be pushed.
如果您只提交那个文件,那么它就是唯一一个将被推送的文件。
回答by user212131
You can commit single files
您可以提交单个文件
user@mypc~$ git add single/path/to.file
user@mypc~$ git commit -m "si"