English 中文(简体)
吉唐过滤器:有可能更新信息,以参考旧的专用识别器?
原标题:Git filter-branch: possible to update commit messages to reference old commit IDs?
  • 时间:2012-04-20 15:17:03
  •  标签:
  • git

I can successfully run git filter-branch on some code to e.g. merge another repo into a subdirectory [1]:

git filter-branch --index-filter  
  git ls-files -s |
  perl -pe "s{	"?}{$&helper/}" |
    GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info &&
  mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE
  remotes/helper/master

但现在,我也热爱扩大每个承诺的信息,使其包括以前的国际发展学会(SHA hash),因为这些承诺可能已经对Gite Hub发表了评论/反对意见,而现在正是这些评论和想法被转移。

例如,添加一条与这一条相类似的外线(bob/helpers是硬编码/事先知道):

[COPIED FROM bob/helpers@76c7c080b3bd2f93dc78e4864899d668a57cd9f9]

就我所知,Gite smsg-filter只给我原始信息,Gite senv-filter。 不包括作为投入变量的承付权。 这样做是否可行?

感谢!

http://zrajm.org/ref/git-repo-merging.html。 这一伟大的文章,其中从

最佳回答

原始承诺识别器位于环境变量$GIT_COMMIT,因此(未经测试)将电文过滤简单明了:cat;呼应“[来自bob/helpers@$GIT_COMMIT]”

问题回答

暂无回答




相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...