From 109327358114d369dcfea683ba6cfd02c35ffab6 Mon Sep 17 00:00:00 2001 From: fangsenpeng <1329347563@qq.com> Date: Mon, 21 Jul 2025 15:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1git=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E4=BD=BF=E7=94=A8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../git\345\221\275\344\273\244.md" | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 "2025/\347\254\2543\347\273\204(PSoC62 evaluation Kit)/fsp/\347\254\224\350\256\260/git\345\221\275\344\273\244.md" diff --git "a/2025/\347\254\2543\347\273\204(PSoC62 evaluation Kit)/fsp/\347\254\224\350\256\260/git\345\221\275\344\273\244.md" "b/2025/\347\254\2543\347\273\204(PSoC62 evaluation Kit)/fsp/\347\254\224\350\256\260/git\345\221\275\344\273\244.md" new file mode 100644 index 0000000..a1ac4be --- /dev/null +++ "b/2025/\347\254\2543\347\273\204(PSoC62 evaluation Kit)/fsp/\347\254\224\350\256\260/git\345\221\275\344\273\244.md" @@ -0,0 +1,39 @@ +提交代码: + +``` +git status +git add . +git commit -m "" +``` + +查看历史 + +``` +git log +``` + +查看所有分支 + +``` +git branch -a +``` + +切换分支 + +``` +git switch [branch name] +``` + +创建分支 + +``` +git branch -b [new branch name] +``` + +切换到历史某一commit + +``` +git reset --hard [commit hash] [HEAD~ 上一次提交] +git reset --soft [commit hash] [HEAD~ 上一次提交] +``` + -- Gitee