惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - stonespawn

Vue 组件库2 Vue 的组件库 算法小题目 VS2019 自动代码补全功能 GIT 删除操作 vue-router 注意事项 Vue中axios访问 后端跨域问题 Vue2.0 搭配 axios Vue 脚手架搭建 grunt使用入门 Ajax在调用含有SoapHeader的webservice方法 关于JS 树形结构 导出EXCEL【Web方式HTML通过拼接html中table】 链接点击跳动问题 WatiN——Web自动化测试(三)【弹出窗口处理】 WatiN——Web自动化测试(二) WatiN——Web自动化测试(一) 网页调用服务程序 - stonespawn - 博客园 小问题 小技巧 :创建虚拟目录并将IIS里面.net配置版本设为2.0 - stonespawn
Git相关操作及记录
stonespawn · 2017-05-11 · via 博客园 - stonespawn

一、软件

1、下载Git客户端软件

Widows平台:

https://github.com/git-for-windows/git/releases/download/v2.13.0.windows.1/Git-2.13.0-64-bit.exe

Mac OS X系统:

https://sourceforge.net/projects/git-osx-installer/files/git-2.13.0-intel-universal-mavericks.dmg/download?use_mirror=autoselect

2、TortoiseGit

安装包:

https://download.tortoisegit.org/tgit/2.4.0.0/TortoiseGit-2.4.0.2-64bit.msi

语言包:

https://download.tortoisegit.org/tgit/2.4.0.0/TortoiseGit-LanguagePack-2.4.0.0-64bit-zh_CN.msi

二、Git SSH Key 配置

1、SSH Key 生成

a) 检查本机是否已经存在SSH Key:cd ~/.ssh

 

b) 设置Git的user name和email:

$ git config --global user.name "zhoumingjun"

$ git config --global user.email "zhoumingjun@purang.com"

c) 生存密钥:$ ssh-keygen -t rsa -C “zhoumingjun@purang.com”  

3个回车,密码为空。如下图:

 

d) 此时在windows用户下生成2个密钥文件:

 

2、SSH Key 配置

a) 打开Bitbucket进入

 

b) 添加SSH Key

将本地的公钥用文本打开全选copy,然后copy到Bitbucket上

 

保存之后,此时生成了一条SSH Key记录

 

三、Git 命令使用

1、获取源码,git clone  ssh://git@10.1.110.21:7999/pbq/pbq.git

 

此时我的本地就已经有xxx的源码文件

 

2、添加一个文件c.txt,git add

 

3、将文件提交到仓库 git commit

 

4、推送本地更新到远程 git push

 

5、更新远程更新到本地 git pull

 

6、添加多个文件git add -A

 

7、删除文件及文件夹 git rm

 

四、TortoiseGit使用

1、获取源码 git clone

 

找到TortoiseGit安装的目录下找到puttygen.exe文件运行,选择通过git bash 生成的id_rsa密钥文件

 

然后保存带有.ppk后缀的文件名:id_rsa.ppk

 

右键Git clone,选择刚刚保存的私钥,点击OK,即可获取源码。

2、添加文件

右键TortoiseGit Add

点击Commit

 

选择Commit&Push 即可提交文件

3、更新远程更新到本地

 

4、其他操作:添加多个文件、撤销Commit等操作等都是图形化操作。