Re: merge time
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 30, 2007, 07:49 UTC
- Message-ID
- <20070730074937.GT20052@spearce.org>
- In-Reply-To
- <E49A2B0B-DAA3-4A03-925D-D3D113F907F1@zib.de>
Steffen Prohaska <prohaska@zib.de> wrote:
Show 6 quoted lines
> Another option could be to force a commit before the merge, even > if there are no changes to commit, something like > > $ git commit --force -m 'MARK' > > [to my knowledge, --force or similar is not yet available]
git-force-commit:
git config --global alias.force-commit \ '! git update-ref HEAD $(echo MARK | git commit-tree HEAD -p HEAD)'
But you didn't hear it from me. ;-)
Yes, I've actually done this once in a while. But only to create some temporary throw-away state that I need for some diff operation or whatnot. Usually because I make it in one repository, but want to fetch it into another and fetch likes moving refs to commits better than refs to trees. Oh, and I'm usually passing in more than one -p, and usually not HEAD as the tree. But whatever.
-- Shawn.