git笔记

在指定目录进行如下操作
初始化后才能配置对应目录的参数
git init
配置用户名和邮箱(config为全局配置)
git config --global user.name "your_name"
git config --global user.email "your_email@example.com"
创建SSH KEY
ssh-keygen -t rsa -C "your_email@example.com"
添加文件到版本库
#添加指定文件
git add README.me
#把当前目录下所有文件添加到版本库
git add .
提交描述
git commit -m "提交的描述信息"
指定本地库与github上的哪个项目相连
git remote add origin git@github.com:ellocc/gittest.git
本地库提交到github上
git push -u origin master
将github上的项目下载下来。
git clone -b master git@github.com:ellocc/gittest.git
从远程获取最新版本并merge到本地,-r rebas
git pull origin master -r
从远程获取分支并本地创建关联
git checkout -t origin/master
查看远程分支
git branch -va

http://blog.csdn.net/hudashi/article/details/7664457
http://www.ruanyifeng.com/blog/2014/06/git_remote.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值