git使用

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使用

上一篇:QApplication和QCoreApplication


下一篇:创建Django项目(五)——URL配置和视图