Git指南(1)

最近想做openstack的开发,需要用到git,看了proGit这本书,概念讲得很多,但缺乏一个相对实际操作的例子,准备结合书中原理,自己写一个相对简单的例子进行学习

安装:

redhat
yum -y install git git-core
ubuntu
sudo apt-get install git git-core
windows
安装图形化msysGit

初次运行前配置

/etc/gitconfig
系统中所有用户都普遍使用的配置
使用git config时用 --system 进行配置
~/.gitconfig
用户目录配置文件只试用于该用户
使用git config时用 --global 进行配置
[project]/.git/config
当前项目git目录的配置文件
git config默认使用

github注册

git config --global user.name "samplename"
git config --global user.email "samplename@163.com"

git hub create new project "git_test"
git clone "https://github.com/youzhibicheng/git_test.git"

cd git_test
vim readme.txt
git status
git commit -m "this is my first time commit to git"
git push
    input the username and password of githun
got to website www.github.com, find your project, you will find the new added file "readme.txt"



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值