# Cloning our fork
$ git clone git@github.com:ifad/rest-client.git
# Adding (as "endel") the repo from we want to cherry-pick
$ git remote add endel git://github.com/endel/rest-client.git
# Fetch their branches
$ git fetch endel
# List their commits
$ git log endel/master
# Cherry-pick the commit we need
$ git cherry-pick 97fedac
同一个项目 合并dev分支的一次提交到master
git checkout master
git log dev --oneline
git cherry-pick 97fedac (提交记录中的编码)
其它问题
=======================================================================
.gitignore规则不生效
.gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。
解决方法就是先把本地缓存删除(改变成未track状态),然后再提交:
git rm -r --cached .
git add .
git commit -m 'update .gitignore'
git 获取其它项目git的一次提交
于 2021-06-17 17:26:28 首次发布