# git使用
---
## git clone
>主要進行將代碼從服務端克隆到本地的過程
## git checkout -b
>生成分支
## git提交過程
1. git status
2. git add .
3. git commit -m "description"
4. git pull
5. git push
## 生成SSH KEY
> 下載git.exe這個就不用說了吧。。。
下完之后會有個`git bash`,打開這個
輸入命令
```
?ssh-keygen -t rsa -C "email@email.com"
?# "email@email.com"是你的github賬號
```
不想設置密碼什么的就一直`enter`吧,如果設置了,每次要輸入密碼很繁瑣
此時,你的`~/.ssh`路徑下會生成兩個文件:`id_rsa`和`id_ras.pub`
打開pub后綴的,復制內容到`github`或者`gitee`或者`code.aliyun`的密鑰上
## Git全局設置
> 前提是你已經在`Gitee`或者`Github`上加入了你的`ssh key`
```
?git config --global user.name "yourname"
?git config --global user.email "your email"
```
## 創建Git倉庫
```
?mkdir 倉庫名稱
?cd 倉庫名稱
?git init
?touch README.md # 可選
?git add README.md # 沒有這個就直接執行 git add .
?git commit -m "first commit" ?# 提交的消息,可以理解為注釋
?git remote add origin git@gitee.com:用戶名/倉庫名稱.git
?# 或者github是這樣的 git remote add origin git@github.com:用戶名/倉庫名稱.git
?git push -u origin master
```
## 已有倉庫
```
?cd 倉庫名稱
?# gitee
?git remote add origin git@gitee.com:用戶名/倉庫名稱.git
?# github
?git remote add origin git@github.com:用戶名/倉庫名稱.git
?git push -u origin master
```
## 命令
> 把剛變化的文件進行追加上去
>
> **前提:你并沒有push上去,只是提交了commit之后還進行修改了**
```
?git add .
?git commit --amend --no-edit
```
- PHP獲取客戶端瀏覽器信息和版本
- PHP獲取客戶端操作系統信息
- 無限級分類
- git使用
- 權限檢測思路
- Vue學習
- 遇到的一些問題
- PHP的編碼思維和技巧
- mysql復習
- tp5
- ThinkPHP5.x 公共函數
- TP5登錄注冊
- TP5使用模板繼承
- ThinkPHP5.1 清除緩存
- thinkphp5實現安裝程序
- 安全
- tp中實現跨域代碼
- ThinkPHP5.1配合pjax實現菜單欄無刷新跳轉
- 獲取數據庫版本和數據庫大小
- 模型的基本CURD操作
- 商品spu
- 全局異常處理類
- ExceptionHandler
- BaseException
- PHP函數之error_reporting(E_ALL ^ E_NOTICE)詳細說明
- 微信小程序
- wx:for
- tp6
- 分離的一些模塊
- session開啟
- Spring
- 依賴注入
- 數據結構
- 二叉樹
- js獲取地址欄變量
- PHP設計模式
- 面向對象
- PHP1
- PHP性能優化
- Java學習
- static關鍵字
- 多態
- 接口、階乘
- 大佬給的面試題
- 訪問量為5000萬的博客系統設計
- PHP可變參數
- Nginx的配置案例
- 求數組中的最大值,并返回數組索引
- PHP面試方向
- PHP數組工具類ArrUtil
- 字符串工具類StrUtil
- PHP使用curl發送請求
- mysql
- PHP上傳base64圖片處理函數
- webstorm小程序常用配置
- 郵箱正則表達式
- leetcode mysql記錄
- 函數庫