DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

使用Git进行版本控制


  1. 安装(Ubuntu系统):sudo apt-get install git-core

  2. 配置用户:

$ git config --global user.name "Scott Chacon" $ git config --global user.email "schacon@gmail.com"

  1. 新建仓库,并加入源代码:

godu@guserver:~$ mkdir gitRepo

godu@guserver:~$ mv GoduServer gitRepo

  1. 初始化仓库:在需要建立仓库的文件夹下运行:git init

godu@guserver:~$ cd gitRepo/

godu@guserver:~/gitRepo$ git init

  1. 添加版本控制:godu@guserver:~/gitRepo$ git add .

  2. 查看当前状态(有哪些文件可以提交):godu@guserver:~/gitRepo$ git status

  3. 提交版本:git commit

参考:Git Community Book中文版



Published

Mar 4, 2011

Last Updated

Mar 4, 2011

Category

Tech

Tags

  • ubuntu 61

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor