Re: merge time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steffen Prohaska <prohaska@xxxxxx> wrote:
> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux