-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Apr 10, 2024
1 parent
7a0a0ac
commit e168d40
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,21 +19,21 @@ git 命令选项非常多,对于软件开发只需熟练掌握其中十几个 | |
## 仓库操作 | ||
### 分支操作 | ||
1. clone分支 | ||
git clone <远程仓库的网址> -b <分支名称> <本地目录> | ||
`git clone <远程仓库的网址> -b <分支名称> <本地目录>` | ||
|
||
1. 创建分支 | ||
git checkout -b <分支名称> | ||
`git checkout -b <分支名称>` | ||
|
||
1. 删除分支 | ||
git branch -d <分支名称> # 删除分支 | ||
git push origin --delete <远程分支名> | ||
`git branch -d <分支名称> # 删除分支` | ||
`git push origin --delete <远程分支名>` | ||
|
||
1. 远程关联 | ||
git remote set-url origin [email protected]:yourusername/yourrepo.git | ||
git remote -v | ||
`git remote set-url origin [email protected]:yourusername/yourrepo.git` | ||
`git remote -v` | ||
|
||
git push <远程主机名> <本地分支名> <远程分支名> | ||
git push origin lcj_qemu:master | ||
`git push <远程主机名> <本地分支名> <远程分支名>` | ||
`git push origin lcj_qemu:master` | ||
|
||
1. 合并与变基 | ||
git merge <分支名称> | ||
|