分类 软件应用 下的文章

完整的报错信息如下:

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "7130e2d3-3630-4c6c-b306-e96282ec6426", "--type", "headless"]
Stderr: VBoxManage: error: RawFile#0 failed to create the raw output file X:/development/env/xenial64/ubuntu-xenial-16.04-cloudimg-console.log (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

解决方法:
在Vagrantfile中关于virtualbox的部分做如下配置:

  config.vm.provider "virtualbox" do |vb|
  #   Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
    vb.memory = "1024"
    vb.cpus = 2
  # Basebox ubuntu/xenial64 comes with following Vagrantfile config and causes https://github.com/joelhandwell/ubuntu_vagrant_boxes/issues/1
  # vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
  # vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "ubuntu-xenial-16.04-cloudimg-console.log") ]
  # following config will address the issue
    vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]

  end

Step 1 准备工作

本地安装git bash:
https://gitforwindows.org/

注册github帐号:
https://github.com/

Step 2 git 基本使用方法

在本地项目目录中初始化git:

git init

Clone

拉取远程仓库数据:

git clone https://github.com/username/projectname.git

设置用户名及密码:

git config global user.name "username"
git config global user.email "username@domain.com"

查看本地仓库状态:

git status

添加文件:

git add filename.file

添加远程仓库:

git remote add origin https://github.com/username/projectname.git

Push

提交代码到master分支

git push origin master

分支操作

查看当前项目分支:

git branch

本地创建一个dev分支:

git checkout -b dev

提交分支

git push origin HEAD -u

提交代码到dev分支:

git push origin dev