ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# git 安装TortoiseGit和中文语言包 PuTTY生成ssh key 主要生成过程移动鼠标更快 把生成的私密保存成ppk类型文件,[复制sshkey绑定到github.com](http://xn--sshkeygithub-r65tncu27lzkjy24m.com) 安装windows for github ``` <pre class="calibre14">``` C<span class="token2">:</span>\app\Git\cmd 绿色版需要添加到环境变量path ``` ``` bash下操作 ``` <pre class="calibre14">``` git clone https<span class="token2">:</span><span class="token">/</span><span class="token">/</span>github<span class="token2">.</span>com<span class="token">/</span>logoove<span class="token">/</span>logoove<span class="token2">.</span>github<span class="token2">.</span>com<span class="token2">.</span>git 复制到本地 git remote add origin git@github<span class="token2">.</span>com<span class="token2">:</span>logoove<span class="token">/</span>weui2<span class="token2">.</span>git ``` ``` 登录 ``` <pre class="calibre14">``` git push <span class="token">-</span>u origin master ``` ``` 生成私钥:openssl genrsa -out rsaprivatekey.pem 2048 生成公钥:openssl rsa -in rsaprivatekey.pem -out rsapublickey.pem -pubout 转换格式:openssl pkcs8 -topk8 -in rsaprivatekey.pem -out pkcs8rsaprivate\_key.pem -nocrypt 可选1024加密长度,转换后公钥与转换前一样可用 ssh-keygen -t rsa -C ["logove@qq.com](mailto:%22logove@qq.com)" 建立本地ssh key 然后查看.pub文件复制里面所有内容到github主页进入Account Settings,左边选择SSH Keys,Add SSH Key,title随便填,粘贴key。 接着输入ssh -T <git@github.com> ``` <pre class="calibre14">``` git config <span class="token">--</span>global user<span class="token2">.</span>name <span class="token4">"logoove"</span> git config <span class="token">--</span>global user<span class="token2">.</span>email <span class="token4">"logove@qq.com"</span> ``` ``` 修改远程地址 ``` <pre class="calibre14">``` git remote add origin git@github<span class="token2">.</span>com<span class="token2">:</span>logoove<span class="token">/</span>logoove<span class="token2">.</span>github<span class="token2">.</span>com<span class="token2">.</span>git ``` ``` 添加注释 git add ./ -a 记录删除或修改 git commit -m "first commit" git push origin master 上传 git pull origin master 更新 192.30.252.130 [github.com](http://github.com) 添加到hosts Pages只需要创建分支gh-pages 在一个新目录内打开bash输入 `git init` 克隆一个项目 `git clone https://github.com/logoove/prize.git` 重看文件状态 `git status -s` 添加文件 `git add .` 添加当前目录 \* 代表递归添加 提交 `git commit -m "描述"` 推送 `git push origin master` 配置 ``` <pre class="calibre14">``` git config <span class="token">--</span>global user<span class="token2">.</span>name <span class="token4">"logoove"</span> git config <span class="token">--</span>global user<span class="token2">.</span>email <span class="token4">"logove@qq.com"</span> ``` ``` 创建分支 `git branch 分支名字` 删除 `git branch -d 分支名字` 切换分支 `git branch` 合并分支 `git merge 分支名` 显示分支提交记录 `git log` linux安装git git --version ``` <pre class="calibre16">``` yum <span class="token">-</span>y install zlib<span class="token">-</span>devel openssl<span class="token">-</span>devel perl hg cpio expat<span class="token">-</span>devel gettext<span class="token">-</span>devel curl curl<span class="token">-</span>devel perl<span class="token">-</span>ExtUtils<span class="token">-</span>MakeMaker hg wget gcc gcc<span class="token">-</span>c<span class="token">++</span> #安装依赖包 wget https<span class="token2">:</span><span class="token">/</span><span class="token">/</span>www<span class="token2">.</span>kernel<span class="token2">.</span>org<span class="token">/</span>pub<span class="token">/</span>software<span class="token">/</span>scm<span class="token">/</span>git<span class="token">/</span> #下载 tar zxvf git<span class="token">-</span><span class="token3">2.6</span><span class="token3">.0</span><span class="token2">.</span>tar<span class="token2">.</span>gz #解压 cd git<span class="token">-</span><span class="token3">2.6</span><span class="token3">.0</span> #编译 <span class="token2">.</span><span class="token">/</span>configure <span class="token">--</span>prefix<span class="token">=</span><span class="token">/</span>usr<span class="token">/</span>local<span class="token">/</span>git make make install ``` ```