From: Tomas Carnecky <tomas.carnecky@gmail.com>
To: Andreas Krey <a.krey@gmx.de>, git@vger.kernel.org
Subject: Re: Like commit -a, but...
Date: Mon, 05 Nov 2012 21:36:28 +0000 [thread overview]
Message-ID: <1352151388-ner-1077@calvin> (raw)
In-Reply-To: <20121105205628.GG21244@inner.h.apk.li>
On Mon, 05 Nov 2012 21:56:28 +0100, Andreas Krey <a.krey@gmx.de> wrote:
> On Mon, 05 Nov 2012 21:29:48 +0000, Andreas Krey wrote:
> ...
> > But still I'd like to know if there is a cleaner solution,
> > esp. with respect to the index.
>
> Actually, it seems
>
> commit -m 'index'
> commit -a -m 'worktree'
> ...push
> git reset HEAD^
> git reset --soft HEAD^
>
> might do the index trick.
>
> But is there a direct way to convert the current working tree into a
> tree object?
PARENT=$(git rev-parse HEAD)
TREE=$(git write-tree)
COMMIT=$(git commit-tree -p $PARENT -m "message' $TREE)
git push origin $COMMIT:refs/heads/teh-branch
write-tree+commit-tree is what git-commit does internally.
next prev parent reply other threads:[~2012-11-05 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 20:29 Like commit -a, but Andreas Krey
2012-11-05 20:56 ` Andreas Krey
2012-11-05 21:36 ` Tomas Carnecky [this message]
2012-11-05 22:36 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352151388-ner-1077@calvin \
--to=tomas.carnecky@gmail.com \
--cc=a.krey@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).