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 0000000000000000000000000000000000000000..a1ac4bea3ba809111d480bcbb545e7f26220c4ce --- /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~ 上一次提交] +``` +