简体   繁体   English

如何让“git push production”推送存储库中的所有文件?

[英]How can I make "git push production" push all files in repository?

Setting up a new laravel server I see that not all files are pushed.设置新的 laravel 服务器我看到并非所有文件都被推送。

I set up a bare repo, according to the instrctions in: https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/ (step 11 and following)我根据以下说明设置了一个裸仓库:https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/ (步骤 11 及以下)

The first time it pushed a lot of files.第一次推送了很多文件。 The css and js files that were added to the /resources later, are not pushed anymore.后面添加到/resources的css和js文件不再推送。 /resources is not in.gitignore, so they should be pushed. /resources 不在.gitignore 中,所以应该推送它们。

They are there in the local repo, but not on the remote.它们在本地仓库中,但不在远程仓库中。

How can I solve this?我该如何解决这个问题?

Can anyone help me ( noob, makes stupid errors) analyse the situation?谁能帮我(菜鸟,犯愚蠢的错误)分析情况?

.gitignore: .gitignore:

/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
.*.swp
public/js
public/css

Files or folders listed in your.gitignore are ignored by git, therefore won't be pushed into your remote repo.您的.gitignore 中列出的文件或文件夹会被 git 忽略,因此不会被推送到您的远程仓库中。 All other files should get pushed just fine.所有其他文件都应该被推送得很好。

Solved:解决了:

 git push production new-branch
 git checkout master
 git merge new-branch
 git push production master

Can anyone see what the problem was?谁能看出问题所在? I still do not understand what went wrong...我还是不明白出了什么问题...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM