We recently swapped Appium branches so that the old 1.5 branch is now master. This is great! Unless you already have a local copy of Appium master checked out and want to do a git pull. Unfortunately since we have reset master this is no longer possible. Here's how you do it.

  1. Ensure you have no local changes or commits you want to save. (If you do, get them in a branch).
  2. Figure out what your Appium remote branch is called. For me it is upstream, for you it might be origin. Below, I will call this <remote> and you should replace it with the reality for your own local checkout.
  3. git checkout master
  4. git reset --hard fbbb126 -- this will get you to a place in the git history prior to the divergence
  5. git pull <remote> master -- this will get all the new code
  6. You might also need to rm -rf submodules/ in order to have a clean checkout, since we no longer track submodules in the Appium git repo.

That's it! Happy hacking.

各位要 hack 的人注意了!别掉坑里。


↙↙↙阅读原文可查看相关链接,并与作者交流