码迷,mamicode.com
首页 > Windows程序 > 详细

Windows平台使用git bash管理github中的工程

时间:2015-07-20 06:45:42      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

1、安装git bash

 msysgit(http://code.google.com/p/msysgit/)

 

2、创建SSH key

右键点击目录,

ssh-keygen.exe -C "your_email@github" -t rsa

生成的key存放位置:

SSH key的原理:

 

3、拷贝公钥到github

测试一下公钥是否可用

ssh -T git@github.com

 

4、从github拷出你的代码

拷出

$git clone git://github.com/schacon/simplegit.git

 

5、开始向github提交或
提交
  5.1 配置
  git config --global user.name "Your Name"
  git config --global user.email your_email@gmail.com
 
5.2 创建Repository
 
1 mkdir clrs
2 cd clrs
3 git init
4 touch README
5 git add README
6 git commit -m ‘first commit‘
7 git remote add origin git@github.com:your_name/clrs.git
8 git push origin master
 
5.3 提交已经存在的Repository
 
1 cd existing_git_repo
2 git remote add origin git@github.com:your_name/clrs.git
3 git push origin master
 
参考:
http://blog.lmlphp.com/archives/7/The_use_tutorial_of_git_bash_and_how_to_start_with_github
http://www.cnblogs.com/zdz8207/archive/2012/04/27/git-github.html

Windows平台使用git bash管理github中的工程

标签:

原文地址:http://www.cnblogs.com/superpig0501/p/4658487.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!