search

Home  >  Q&A  >  body text

git 如何切换前一个分支

RT git经常用到常用命令

当前分支愉快玩耍呢,然后 有人呼喊你 “那个小谁,xx分支有bug 看一下” “小谁xx分支有问题帮忙看下”

于是 经常在 当前开发分支,切换到某分支,又切换回来继续干活。

想问git有没有,切换上个分支功能。

曾经蜡笔没有小新曾经蜡笔没有小新2891 days ago631

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-28 09:07:28

    git checkout -
    

    reply
    0
  • PHP中文网

    PHP中文网2017-04-28 09:07:28

    Use git stash to save the current changes, then switch to the branch that needs to fix the bug, and switch back after the changes are completed.
    Then git stash list determines the contents of stash, and git stash apply stash{xx}

    reply
    0
  • Cancelreply