git branch mybranch a0fbc78
现在您有一个命名分支,指向您的提交。从现在开始,您可以做很多事情。您可以检查出来
git checkout mybranch
您可以创建工作树
git worktree add wtree-path mybranch
您可以克隆
git clone --single-branch --branch mybranch
您可以将其放入另一个存储库
git pull origin mybranch
假设您在所有这些操作之前提交了这些代码,那么所有这些操作都不会与树形代码的顶部混淆。
git fetch
而不是git pull
,以便您可以从远程获取信息,而不会弄乱当前的工作。