Git使用笔记

win7安装git客户端

使用git bash

在gitcafe上新建一个项目

1.创建一个新项目

拥有者:answernotfount
项目名称:testproject
项目中文名称:测试项目
项目描述:这是一个测试项目
项目主页(选填):
……

2.在电脑上安装和设置Git

全局设置

git config --global user.name 'answernotfound' git config --global user.email 'answernotfound@answernotfound.com'

接下来:
在本地创建新的Git仓库
mkdir testproject
cd testproject
git init
touch README.md
git add README.md
git commit -m 'first commit'
git remote add origin 'git@gitcafe.com:answernotfound/testproject.git'
git push -u origin master
或者提交在本地已有Git仓库
cd existing_git_repo
git remote add origin 'git@gitcafe.com:answernotfound/testproject.git'
git push -u origin master
生成密钥

生成一对密钥is_rsa和id_rsa.pub并将id_rsa.pub中的内容添加到公钥管理中。

原文地址:https://www.cnblogs.com/answernotfound/p/gitnote.html