Skip to content

Commit e780a8c

Browse files
committedSep 13, 2023
update git.txt
1 parent 2c2ee5f commit e780a8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎tools/git.txt

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
git config --global "Your Name"
1212
git config --global "Email Address"
1313
git config --global credential.helper store 保存密码(每次要输密码/重复输密码)
14+
git config user.name "Your Name" 配置当前仓库用户名
15+
git config user.email "Email Address" 配置当前仓库邮箱地址
1416

1517

1618
##############################################################################
@@ -152,6 +154,7 @@ git checkout <branch name> 切换至<branch name>分支
152154
git switch <branch name> 切换至<branch name>分支 (2.23 引入)
153155
git checkout -b <branch name> 创建并切换至<branch name>分支
154156
git switch -c <branch name> 创建并切换至<branch name>分支
157+
git checkout origin/master -b <branch name> 基于远程仓库<origin>下的<master>分支创建一个新的分支
155158
git branch 查看已有分支(* 表示当前分支)
156159
git merge <branch name> 合并<branch name>到当前分支(通常在master分支下操作)
157160
git merge --no-commit <branch name> 合并<branch name>到当前分支,但不提交

0 commit comments

Comments
 (0)
Please sign in to comment.