如何与两位用户合作? [英] How to git pull with two users?

查看:104
本文介绍了如何与两位用户合作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过将存储库克隆到生产服务器来部署我的应用程序。
当我进行一些更改时,我只需转到生产服务器并调用:git pull。
我不知道这是否是正确的部署方式,但现在对我来说工作正常。



但是我有一个问题,我已经开始与另一位开发人员一起工作,并且为了
更新存储库,我们必须知道其他密码,并在生产服务器上执行git pull,这当然是无稽之谈。在GIT之前,我使用SVN并且没有这样的问题,
每个人都可以用他的账户调用svn update。

如何解决这个问题或从git部署应用程序的推荐方式?

解决方案

如果问题在于您没有正确的权限来运行 git pull

code>,可以尝试使用 - shared = all 来初始化您的生产存储库,这会告诉git设置权限。任何人都可以运行git命令。


I deploy my applications by cloning repository into production server. When I make some changes I just go to the production server and invoke : git pull . I don't know if this is the right way of deploying but it works fine for me for now.

But I have one issue, recently I've started working with another developer and to update the repository we have to know each other passwords and do git pull on production server, which is of course nonsense . Before GIT I used SVN and there was no such issues, everybody could invoke svn update with his account.

How to solve this issue or what is recommended way of deploying application from git ?

解决方案

If the problem is that you don't have the right permissions to run git pull on a repository checked out by another user, you can try to initialise your production repository using --shared=all, which will tell git to set permissions so that anyone can run git commands.

这篇关于如何与两位用户合作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆