i 试图在同一个机器上安装供我浏览的git服务器和部署服务器。 我利用以下指挥把该项目从当地机器推向git服务器/部署服务器:
git remote add origin path_to_git_server
git push origin master
然后,在git服务器上,我在~/git/log.git/ref/head
i 试图在同一个机器上安装供我浏览的git服务器和部署服务器。 我利用以下指挥把该项目从当地机器推向git服务器/部署服务器:
git remote add origin path_to_git_server
git push origin master
然后,在git服务器上,我在~/git/log.git/ref/head
您可能设立了<代码>git init --bare的存放处,因为这一存放处只是盖特的存放处,而不是工作阶段。 我会把这个装置设为三台机器布局,但可以运行两台甚至一台机器。
机器A(开发机)
机器B(远程存放处)
机器C(生产环境)
(如果你生产、开发和“再分配”存放在一只罚款机器上)
当你重新准备把你的工作推向机器B(Repo)时,你将工作推向机B(Repo)进行,然后是右边,然后执行<条码>git Bull(在做边远添加之后),从而更新了Bare边远存放处,并更新了自上一次推进以来从机器进行的所有变化(认为它是把你机器的夹在机器上的内容与遥控背心)。
自2006年以来 只关注贵国档案内容的变化(而不是实际上涉及档案或文件夹本身——相信我不关心你的档案——只是内容),它把机器B的档案存放在你的机器A“工作阶段”上。 将这些档案放在工作阶段,供你使用和开发,但是,Gite don不关心这些档案,这再次只是关注自你上次承诺以来“档案”内容的变化。
为了部署你的代码,你需要去机械C,把机器B的存放处带上,然后根据机器所追踪的所有内容建立随后的档案/文件。 一旦您戴上了这一存放处,你就可以通过<条码>git pull/条码>获得今后的最新情况。
这 about了它的 j子。 如果你们一掌握全部电脑,你就可以做这样的事情:
~/projects/git_project (Your devel area)
/home/repo/git_project.git ("Remote" repo)
/opt/rails/git_project ("Production" machine)
在一台机器上安装了遥远的再补给机,因为从技术上来说,你可以拉开,从中推走。
~/projects/git_project
纽约总部
/opt/rails/git_project
但是,仅仅让榜样符合规定。
您有可能在服务器上建立一个光天存放处。 仅有的存放处没有当地查抄受改性控制的任何档案的副本。
如果您想要在服务器上有一个核对打印文本,则使用git in
至-bare
,以初步确定电子储存库,并设定<编码>接收.denyCurrentBranchignore
,以便push
指令。 此外,你需要确保不会改变服务器上盖特存放处的任何档案。
Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...
I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...
I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I ...
I understand how to merge branches together in git, and I love how easy it makes it. I have a branch that looks like this: project/ |--subproj1/ | |---(files) | |--subproj2/ |---(files) A ...
We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...
I get this on every git svn command I try. I am using git version 1.6.4.2 on OS 10.6 The initial git svn fetch works, and i can do further fetches after that, but they do not enter the log or update ...
Given I have a master branch and a other branch. In the other branch are files I don t want to commit (e.g. log files) so I ignored them in .gitignore. When I switch to the master branch, these ...
Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...