github中有很多commits, 有些是没有merge到相应的分支的,如何获取这些commit的代码?可以用过以下步骤:
1. 从Github中找到相应commit的SHA. 然后运行下述命令:
git fetch origin HASH
2. Checkout
git checkout FETCH_HEAD
3. 在此基础上创建分支
git checkout -b new-branch FETCH_HEAD
至此,大功告成!
github中有很多commits, 有些是没有merge到相应的分支的,如何获取这些commit的代码?可以用过以下步骤:
1. 从Github中找到相应commit的SHA. 然后运行下述命令:
git fetch origin HASH
2. Checkout
git checkout FETCH_HEAD
3. 在此基础上创建分支
git checkout -b new-branch FETCH_HEAD
至此,大功告成!