一、Git的安装

1、git的安装和配置

(1)配置用户名和邮箱,如下所示:

$ git config --global user.name [username]
$ git config --global user.email [email]

(2)使用git config --list查看已设配置的信息:

core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=d:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
credential.helper=manager
user.name=用户名
user.email=邮箱
core.autocrlf=false
core.repositoryformatversion=
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true

2、SSH Key的配置:

1.Windows下打开Git Bash,创建SSH Key,按提示输入密码,可以不填密码一路回车

$ ssh-keygen -t rsa -C "注册邮箱"

然后用户主目录/.ssh/下有两个文件,id_rsa是私钥,id_rsa.pub是公钥。

2.获取key,打开.ssh下的id_rsa.pub文件,里面的内容就是key的内容

$ cat ~/.ssh/id_rsa.pub

3.登录GitHub,打开"SSH Keys"页面,快捷地址:https://github.com/settings/keys

4.测试ssh key是否成功,使用命令“ssh -T git@github.com”,如果出现You’ve successfully authenticated, but GitHub does not provide shell access 。这就表示已成功连上github。

二、在GitHub上创建远程仓库

1、点击上方导航栏的“+”按钮,在下方选择“New  repository”。

2、进入到创建项目页面,按照下图所示输入你要创建项目的信息。

3、获取创建的仓库地址:

4、使用git clone [仓库地址],拉取代码到本地。

$ git clone git@github.com:xxxx/java_ee.git

5、接着可以进行git add、git commit、git push来进行操作。

最新文章

  1. 前端MVVM框架avalon揭秘 - 双向绑定原理
  2. 配置容器configuring Containsers
  3. sql语句常用说明与解析
  4. ubuntu 16.04 挂起后WiFi链接不上
  5. UVa 1646 (递推 JAVA大数) Edge Case
  6. Unity3D之Mecanim动画系统学习笔记(九):Blend Tree(混合树)
  7. string.Format字符串格式说明
  8. Oracle数据库之PL/SQL过程与函数
  9. <php>统计目录数和文件数
  10. Starling开发微信打灰机(二)
  11. html网页中 点击按钮页面跳转
  12. 119 - Greedy Gift Givers
  13. .net微软消息队列(msmq)简单案例
  14. 压缩空格的函数以及BCD码与ASCII相互转换函数
  15. 泛微oa几个常用的js
  16. Wireshark抓包实例诊断TCP连接问题
  17. 配置Django
  18. vue 给url 中文参数 添加编码解码
  19. Android ViewPage的使用(一)
  20. Python3基础 str format 位置参数与关键字参数

热门文章

  1. 使用RestTemplate调用接口上传文件
  2. ASP.NET 简介
  3. hadoop2.7.7 测试安装 centos7
  4. js-for (var in )遍历顺序乱了
  5. numpy中的数学
  6. python添加到环境变量
  7. Java7/8 HashMap ConcurrentHashMap
  8. pip安装插件库
  9. fiddler常用操作之断点
  10. python全栈 流程控制;while 循环 格式化输出 运算符 及编码