Git本地创建分支提交的一些经验

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wuqingdeqing/article/details/86015803

当你想在本地首创分支时,可以用checkout,但若直接写git checkout会报错

error: pathspec 'feature/extract_user' did not match any file(s) known to git.
 

此时应用命令 git checkout -b 分支名

当你想将其直接git push提交到远程时,又会报错

fatal: The current branch feature/extract_user has no upstream branch.
 

此时应用

git push --set-upstream origin feature/extract_user 分支名
 

猜你喜欢

转载自blog.csdn.net/wuqingdeqing/article/details/86015803
今日推荐