git 分支管理(一)
一.preface
二.case
- git clone
- git branch
- git branch -v
- git branch -r
- git checkout -b AdapterBoard_add_update_fw_resetpin_enter_boot origin/AdapterBoard_add_update_fw_resetpin_enter_boot
- git status
- git reset --hard
- git status
* git checkout -b AdapterBoard_add_update_fw_resetpin_enter_boot origin/AdapterBoard_add_update_fw_resetpin_enter_boot * git branch 
- git log
- git status
三.source file
点击查看代码
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git beanch
git: 'beanch' is not a git command. See 'git --help'.
The most similar command is
branch
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git branch
* master
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git branch -v
* master 8801135 20220602
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git branch -r
origin/AdapterBoard_add_update_fw
origin/AdapterBoard_add_update_fw_resetpin_enter_boot
origin/HEAD -> origin/master
origin/XYZ-CAD-fixed-ps2-master
origin/master
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git checkout -b origin/AdapterBoard_add_update_fw_resetpin_enter_boot AdapterBoard_add_update_fw_resetpin_enter_boot
fatal: 'AdapterBoard_add_update_fw_resetpin_enter_boot' is not a commit and a branch 'origin/AdapterBoard_add_update_fw_resetpin_enter_boot' cannot be created from it
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git checkout -b AdapterBoard_add_update_fw_resetpin_enter_boot origin/AdapterBoard_add_update_fw_resetpin_enter_boot
error: Your local changes to the following files would be overwritten by checkout:
PT146 FW/NDT_FW/mdk/aw8680/AW8680X.uvoptx
PT146 FW/NDT_FW/mdk/aw8680/AW8680X.uvprojx
Please commit your changes or stash them before you switch branches.
Aborting
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: mdk/aw8680/AW8680X.uvoptx
modified: mdk/aw8680/AW8680X.uvprojx
Untracked files:
(use "git add <file>..." to include in what will be committed)
mdk/aw8680/AW8680X.uvguix.hui.shi
no changes added to commit (use "git add" and/or "git commit -a")
g
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git add .
warning: in the working copy of 'PT146 FW/NDT_FW/mdk/aw8680/AW8680X.uvoptx', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'PT146 FW/NDT_FW/mdk/aw8680/AW8680X.uvprojx', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'PT146 FW/NDT_FW/mdk/aw8680/AW8680X.uvguix.hui.shi', LF will be replaced by CRLF the next time Git touches it
t
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: mdk/aw8680/AW8680X.uvguix.hui.shi
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$
g
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git reset --hard
HEAD is now at 8801135 20220602
g
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (master)
$ git checkout -b AdapterBoard_add_update_fw_resetpin_enter_boot origin/AdapterBoard_add_update_fw_resetpin_enter_boot
branch 'AdapterBoard_add_update_fw_resetpin_enter_boot' set up to track 'origin/AdapterBoard_add_update_fw_resetpin_enter_boot'.
Switched to a new branch 'AdapterBoard_add_update_fw_resetpin_enter_boot'
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (AdapterBoard_add_update_fw_resetpin_enter_boot)
$ git branch
* AdapterBoard_add_update_fw_resetpin_enter_boot
master
g
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (AdapterBoard_add_update_fw_resetpin_enter_boot)
$ git log
commit 82f6eaa132bd421d41618b786fdd08be6fc6a550 (HEAD -> AdapterBoard_add_update_fw_resetpin_enter_boot, origin/AdapterBoard_add_update_fw_resetpin_enter_boot)
Author: zhenfenghuang <zhenfeng.huang@newdegreetech.com>
Date: Sun Dec 8 21:49:36 2024 +0800
项目号:PT171 当前版本:41.71.4.0 基于版本:41.71.3.11 版本类型(Z/C):Z 是否外发(Y/N):Y 外发
修改点:
1.擦除flash时check pin10;
2.烧录前拉低pin10,烧录完成后拉高pin10;
3.增加写入固件checksum功能。
对应BUG:
1.
commit 3757a93ae8431e0f60a31b120a846fa8b6cd3064
Author: zhenfenghuang <zhenfeng.huang@newdegreetech.com>
Date: Sat Dec 7 13:32:36 2024 +0800
项目号:PT171 当前版本:41.71.3.11 基于版本:41.71.3.10 版本类型(Z/C/L):L
是否外发(Y/N):否
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (AdapterBoard_add_update_fw_resetpin_enter_boot)
$ git status
On branch AdapterBoard_add_update_fw_resetpin_enter_boot
Your branch is up to date with 'origin/AdapterBoard_add_update_fw_resetpin_enter_boot'.
nothing to commit, working tree clean
hui.shi@T14029 MINGW64 /e/1_colleagues/chen_shu/test/pt274-adapterboard/PT146 FW/NDT_FW (AdapterBoard_add_update_fw_resetpin_enter_boot)
$
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通