美文网首页
git worktree usage

git worktree usage

作者: Yves_lau | 来源:发表于2016-05-10 17:25 被阅读61次

EXAMPLES
You are in the middle of a refactoring session and your boss comes in and demands that you fix something immediately. You might typically use git-stash[1] to store your changes away temporarily, however, your working tree is in such a state of disarray (with new, moved, and removed files, and other bits and pieces strewn around) that you don’t want to risk disturbing any of it. Instead, you create a temporary linked working tree to make the emergency fix, remove it when done, and then resume your earlier refactoring session.

$ git worktree add -b emergency-fix ../temp master
$ pushd ../temp# ... hack hack hack ...
$ git commit -a -m 'emergency fix for boss'
$ popd
$ rm -rf ../temp
$ git worktree prune

https://git-scm.com/docs/git-worktree

install link:https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-12-04

相关文章

  • git worktree usage

    EXAMPLESYou are in the middle of a refactoring session an...

  • Git workTree

    添加worktree git worktree add [-f] [--checkout -b

  • 2020-08-12 git worktree 指南

    最简单的写法:git worktree add <新路径>将基于当前分支,新建一个 worktree 目录,新的分...

  • git worktree

    解决分支依赖冲突问题 在多分支协同开发过程中,node_modules被加入到.gitignore中不被git跟踪...

  • git worktree

    git worktree 记录 1. 切换到当前开发分支 cd project/risesin 2. 创建work...

  • git usage

    git initCreate an empty Git repository or reinitialize an...

  • Git Usage

    git 常用命令 git clone -v git@abc.com[mailto:git@abc.com]:efg...

  • 同时开发多分支:git worktree

    针对已经本地建好的分支:git worktree add ../[工作分支名] [工作分支名] 针对已经本地未建好...

  • git worktree 的使用

    在同一个git仓库中,经常会建立多个分支工作。在多个分支之间切换的时候,如果一个分支不是干净的,则需要暂存再切换,...

  • Git worktree 的使用

    假设这样一个场景,你做完了一个功能,正在跑漫长的测试。喝茶,上厕所,回来一看,这测试竟然还在跑。闲着也是闲着,修复...

网友评论

      本文标题:git worktree usage

      本文链接:https://www.haomeiwen.com/subject/zyyyrttx.html