Re: Like commit -a, but...

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

 



On Mon, 05 Nov 2012 21:56:28 +0100, Andreas Krey <a.krey@xxxxxx> 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.
--
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]