为什么 Git 比 SVN 好

 我来答
会跳舞的小地瓜
2016-09-27 · TA获得超过2299个赞
知道小有建树答主
回答量:792
采纳率:0%
帮助的人:196万
展开全部
为什么 Git 比 SVN 好
  前面的参数 “wwwroot/” 表示的是本地的路径,这里使用对于工作目录的相对路径,这里也可以使用绝对路径,比如: “d:/www/”
  后面的参数 “/var/www” 表示虚拟机中对应映射的目录。
  运行脚本:
  虽然不是必须,但是如果有需要在启动时运行一些脚本(环境的安装或者有些服务的启动需要在完成目录映射之后进行),可以编辑脚本,类似如下(摘自Vagrant Document):
  1 #!/usr/bin/env bash
  2
  3 apt-get update
  4 apt-get install -y apache2
  5 rm -rf /var/www
  6 ln -fs /vagrant /var/www
  保存在和Vagrantfile相同目录,文件名自取(如 boot.sh),然后在Vagrantfile中添加:
  1 config.vm.provision :shell, :path => "boot.sh"
  当初次使用基本的设置都完成则之后,则可以使用 vagrant up 启动虚拟机
  01 Bringing machine 'default' up with 'virtualbox' provider...
  02 [default] Setting the name of the VM...
  03 [default] Clearing any previously set forwarded ports...
  04 [default] Creating shared folders metadata...
  05 [default] Clearing any previously set network interfaces...
  06 [default] Preparing network interfaces based on configuration...
  07 [default] You are trying to forward to privileged ports (ports < = 1024). Most operating systems restrict this to only privileged process (typicallyprocesses running as an administrative user). This is a warning in case
  08 the port forwarding doesn't work. If any problems occur, please try a port higher than 1024.
  09 [default] Forwarding ports...
  10 [default] -- 22 => <strong>2222</strong> (adapter 1)
  11 [default] -- 80 => 8080 (adapter 1)
  12 [default] Booting VM...
  13 [default] Waiting for VM to boot. This can take a few minutes.
  14 [default] VM booted and ready for use!
  15 [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can cause things such as shared folders to not work properly. If you see shared folder errors, please update the guest additions within the virtual machine and reload your VM.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式