git push only one file to Heroku

梦想的初衷 提交于 2020-01-01 09:33:54

问题


Is it possile to only push one file to Heroku, instead off all changed files?

Thanks...


回答1:


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.




回答2:


If you commit only that one file then it is the only one that will be pushed.




回答3:


You can commit single files

user@mypc~$ git add single/path/to.file
user@mypc~$ git commit -m "si"


来源:https://stackoverflow.com/questions/4759174/git-push-only-one-file-to-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!