gitHub分支操作

    xiaoxiao2021-12-14  52

    查看分支:git branch

    创建分支:git branch <name>

    切换分支:git checkout <name>

    创建+切换分支:git checkout -b <name>

    合并某分支到当前分支:git merge <name>

    删除分支:git branch -d <name>

    用带参数的git log也可以看到分支的合并情况:

    git log --graph --pretty=oneline --abbrev-commit 使用no-ff的方式git merge合并分支 git merge --no-ff -m "merge with no-ff" dev

    当手头工作没有完成时,先把工作现场git stash一下,然后去修复bug,修复后,再git stash pop,回到工作现场。

    使用git stash list查看保存个工作现场

    http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c291467cc7c747b1810aab2fb8863508000

    转载请注明原文地址: https://ju.6miu.com/read-969809.html

    最新回复(0)