Refactor code structure for improved readability and maintainability
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
notes/assets/git-add.png
LFS
Normal file
BIN
notes/assets/git-checkout-feat.png
LFS
Normal file
BIN
notes/assets/git-clone.png
LFS
Normal file
BIN
notes/assets/git-commit.png
LFS
Normal file
BIN
notes/assets/git-create-branch.png
LFS
Normal file
BIN
notes/assets/git-pr-list.png
LFS
Normal file
BIN
notes/assets/git-publish-branch.png
LFS
Normal file
BIN
notes/assets/git-pull-origin-main.png
LFS
Normal file
BIN
notes/assets/git-pull-request.png
LFS
Normal file
BIN
notes/assets/git-push.png
LFS
Normal file
20
notes/git.md
@@ -24,7 +24,7 @@ flowchart LR
|
||||
|
||||
浏览器打开仓库地址 <https://git.omoolab.xyz/[orgn-name]/[repo-name]>,点右上的 Code 按钮,点击 Open with VS Code
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git clone [repo.git]`
|
||||
|
||||
@@ -35,13 +35,13 @@ flowchart LR
|
||||
|
||||
点左下角的`main`,点击 Create new branch...,然后输入分支名`[your-name]/[do-something]`(比如`manan/dev`)
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git checkout -b [your-name]/[do-something]`
|
||||
|
||||
创建后,首次推送分支到远程。这样远程也有属于你的分支了
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git push -u origin [branch-name]`
|
||||
|
||||
@@ -53,7 +53,7 @@ flowchart LR
|
||||
|
||||
仓库的任何改动都会罗列在 Changes 下,此时它们并没有得到确认。点击 + 来添加到 Staged Changes 下(你可以只添加部分改动)
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git add [file]`
|
||||
|
||||
@@ -61,7 +61,7 @@ flowchart LR
|
||||
|
||||
输入「提交说明」来记录改动了什么(或者点击小星按钮让 AI 来帮忙总结)。点击 Commit 按钮来确认改动。
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git commit -m [message]`
|
||||
|
||||
@@ -69,7 +69,7 @@ flowchart LR
|
||||
|
||||
点击三个点按钮打开菜单,点击 Push 按钮
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git push`
|
||||
|
||||
@@ -81,7 +81,7 @@ flowchart LR
|
||||
|
||||
点击三个点按钮打开菜单,点击 Pull from...,并选择`origin/main`(注意不是`main`分支,它是本地的,并非最新)
|
||||
|
||||

|
||||

|
||||
|
||||
> 或 Bash 执行 `git pull origin main`
|
||||
|
||||
@@ -93,15 +93,15 @@ flowchart LR
|
||||
|
||||
浏览器访问仓库主页,切换到「个人分支」,点击 New Pull Request 按钮(3)
|
||||
|
||||

|
||||

|
||||
|
||||
确认一下合并方向是否正确,然后填写 PR 标题和内容(改了什么,加了什么),最后点击 Create Pull Request
|
||||
|
||||

|
||||

|
||||
|
||||
PR 会加入队列,等待审核通过。通过后就会合并到`main`啦。
|
||||
|
||||

|
||||

|
||||
|
||||
> 注意,如果在提 PR 后,如果你又更新了你的分支,不必再次提 PR
|
||||
|
||||
|
||||