mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-16 20:21:22 +08:00
feat: add nginx.md
cheatsheet.
This commit is contained in:
34
docs/git.md
34
docs/git.md
@ -328,25 +328,21 @@ Git 技巧
|
||||
|
||||
### 重命名分支
|
||||
|
||||
#### **重命名**为`new`
|
||||
|
||||
```shell
|
||||
$ git branch -m <new>
|
||||
$ git branch -m <old> <new> # 重命名分支
|
||||
```
|
||||
|
||||
#### **推送**并重置
|
||||
|
||||
```shell
|
||||
$ git push origin -u <new>
|
||||
```
|
||||
|
||||
#### **删除**远程分支
|
||||
|
||||
```shell
|
||||
$ git push origin --delete <old> # 方法1
|
||||
$ git push origin :oldBranchName # 方法2
|
||||
```
|
||||
- **重命名**为`new`
|
||||
```shell
|
||||
$ git branch -m <new>
|
||||
$ git branch -m <old> <new> #重命名分支
|
||||
```
|
||||
- **推送**并重置
|
||||
```shell
|
||||
$ git push origin -u <new>
|
||||
```
|
||||
- **删除**远程分支
|
||||
```shell
|
||||
$ git push origin --delete <old> #方法1
|
||||
$ git push origin :oldBranchName #方法2
|
||||
```
|
||||
<!--rehype:className=style-timeline-->
|
||||
|
||||
### Log
|
||||
|
||||
|
Reference in New Issue
Block a user