首页 > 其他 > 详细

git使用

时间:2014-01-15 23:53:58      阅读:682      评论:0      收藏:0      [点我收藏+]

http://qbaty.iteye.com/blog/865368

https://github.com

linux安装

1.申请帐号 guanpanpan panpan_001@126.com

 

2.安装:yum install git

3.配置git :git config --global user.name "guanpanpan" 

git config --global user.email "panpan_001@126.com"

git config --list

4.配置密码

ssh-keygen -t rsa -C "panpan_001@126.com"

Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter]
ssh-add id_rsa

测试:ssh -T git@github.com

            如果有问题输入:ssh-add id_rsa

window:加入:clip < ~/.ssh/id_rsa.pub

linux: sudo apt-get install xclip 或yum install xclip

xclip -sel clip < ~/.ssh/id_rsa.pub

5.下载代码:git clone https://github.com/guanpanpan/ikonw

git命令

http://blog.chinaunix.net/uid-26185912-id-3332628.html

第一步 环境 
(如果你已经安装好了环境,并且在github上设置好了ssh密钥,你可以跳过这些内容) 
目前git已经都具备了mac linux(不用说) win的安装包 
在开始用git工作前,先得确保机器上已经有git的环境 
win 下的git安装http://help.github.com/win-git-installation/ 
mac 下的git安装http://help.github.com/mac-git-installation/ 
linux 下的git安装http://help.github.com/linux-git-installation/ 

Username 

git config --global user.name "Your Name Here"

# Sets the default name for git to use when you commit

Email

git config --global user.email "your_email@example.com"

# Sets the default email for git to use when you commit

第二步 远程连接 

Generatin

 
 

打开 git 命令行,进到你要放置你代码的目录 
输入 git init //git 初始化 

git remote add origin https://github.com/username/Hello-World.git
# Creates a remote named "origin" pointing at your GitHub repository

git push origin master
# Sends your commits in the "master" branch to GitHub
git add README
# Stages your README file, adding it to the list of files to be committed

git commit -m ‘first commit‘
# Commits your files, adding the message "first commit"

 

git使用

原文:http://www.cnblogs.com/guanpanpan/p/3515852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!