GitHub
2014-04-29 13:05
295 查看
在GitHub上保管工程
1. 在http://github.com上注册账号,并登陆
2. 为要保存的工程创建repository
3. 添加ssh keys: 通过在本地执行 ssh-keygen -t rsa -C "your_email@youremail.com" 命令来生成ssh key,将文件id_rsa.pub 中的内容贴到GitHub中
详情可以参阅:https://help.github.com/articles/generating-ssh-keys
4. 将本地的工程目录执行git init命令,通过以下命令将工程push到GitHub中:
git remote add origin git@github.com:gaokewoo/cplus.git
git push origin
详情可以参阅:https://help.github.com/articles/create-a-repo
push到github时,每次都要输入用户名和密码的问题
在github.com上 建立了一个小项目,可是在每次push 的时候,都要输入用户名和密码,很是麻烦
原因是使用了https方式 push
在termail里边 输入 git remote -v
可以看到形如一下的返回结果
origin git@github.com:gaokewoo/cplus.git (fetch)
origin git@github.com:gaokewoo/cplus.git (push)
下面把它换成ssh方式的。
1. git remote rm origin
2. git remote add origin git@github.com:gaokewoo/cplus.git
3. git push origin
http://htc.tgbus.com/desireVshuaji/434235.shtml
Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:gaokewoo/vim_config.git
git push -u origin master
Push an existing repository from the command line
git remote add origin git@github.com:gaokewoo/vim_config.git
git push -u origin master
1. 在http://github.com上注册账号,并登陆
2. 为要保存的工程创建repository
3. 添加ssh keys: 通过在本地执行 ssh-keygen -t rsa -C "your_email@youremail.com" 命令来生成ssh key,将文件id_rsa.pub 中的内容贴到GitHub中
详情可以参阅:https://help.github.com/articles/generating-ssh-keys
4. 将本地的工程目录执行git init命令,通过以下命令将工程push到GitHub中:
git remote add origin git@github.com:gaokewoo/cplus.git
git push origin
详情可以参阅:https://help.github.com/articles/create-a-repo
push到github时,每次都要输入用户名和密码的问题
在github.com上 建立了一个小项目,可是在每次push 的时候,都要输入用户名和密码,很是麻烦
原因是使用了https方式 push
在termail里边 输入 git remote -v
可以看到形如一下的返回结果
origin git@github.com:gaokewoo/cplus.git (fetch)
origin git@github.com:gaokewoo/cplus.git (push)
下面把它换成ssh方式的。
1. git remote rm origin
2. git remote add origin git@github.com:gaokewoo/cplus.git
3. git push origin
http://htc.tgbus.com/desireVshuaji/434235.shtml
Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:gaokewoo/vim_config.git
git push -u origin master
Push an existing repository from the command line
git remote add origin git@github.com:gaokewoo/vim_config.git
git push -u origin master