[英]Can i add few files for some remote repo only in git
I have the git repo and i have two remote repos
one is deafult
and other backup
我有git repo,我有两个
remote repos
deafult
,一个是deafult
,另一个是backup
I push to other branch by 我推到其他分支
git push backup
Now i have folder called backupfiles
which i don't want to push in deafult
but i do want it to be avaiable in backup
repo 现在我有一个名为
backupfiles
文件夹,我不想按deafult
键,但是我确实希望它在backup
回购中可用
is there any way 有什么办法吗
You can choose which refs (branches, tags etc) you push to or fetch from another repository, but the files committed in the history of a ref are non-negotiable (unless you change the history with eg git filter-branch
). 您可以选择要推送到其他存储库或从另一个存储库获取的引用(分支,标签等),但是引用历史记录中提交的文件是不可协商的(除非您使用
git filter-branch
更改了历史记录)。 You could create another branch where you commit the files in the backupfiles
directory and push that branch to a subset of your remote repositories. 您可以创建另一个分支,在其中提交
backupfiles
目录中的文件,并将该分支推送到远程存储库的子集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.