From: Felipe Contreras <felipe.contreras@gmail.com>
To: Yuri <yuri@rawbw.com>, Johannes Sixt <j6t@kdbg.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally
Date: Thu, 06 May 2021 03:40:11 -0500 [thread overview]
Message-ID: <6093ab6bd3ea8_24e620862@natae.notmuch> (raw)
In-Reply-To: <d4ae27b9-3911-506c-a23c-3ed91bb250d1@rawbw.com>
Yuri wrote:
> On 5/5/21 11:43 PM, Johannes Sixt wrote:
> > I know. But, as I said, when you turn away from your current work, which
> > is precious, then you should make a commit, in particular, when you can
> > forsee that you might not be able to come back soon.
>
> How can I commit unfinished work?
Just like that: `git commit`.
That's what you are doing anyway, whether you realize or not.
> Commits are public, this would break things.
No. Commits are most definitely not public. Not unless you do
`git push`, and only if you push to a public repository.
I have countless commits on local branches that nobody would every see.
Many on a "tmp" branch.
I also have many private repositories, which contain passwords and other
sensitive information. Again... Only for my eyes.
> > For long-term storage, use branches.
>
> Branches are too heavy-weight.
No, each one is a single file consisting of 41 bytes.
A single stash takes about 200 bytes. Considerably more.
Compare:
* .git/refs/heads/master
* .git/logs/refs/stash
> They need merging. Sometimes several stash items need to be used
> together, which makes it inconvenient.
You mean like one stash item goes on top of another?
Like... Commits on a branch?
I think this boils down to a confussion of concepts. Stash items are
commits. The only real conceptual difference is that you did not
specify the message (-m tmp would do that trick).
Again. Check yourself; the commit is there:
* git cat-file -p stash@{0}
* git cat-file -p master
Cheers.
--
Felipe Contreras
next prev parent reply other threads:[~2021-05-06 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 19:51 [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally Yuri
2021-05-05 20:07 ` Randall S. Becker
2021-05-05 20:11 ` Yuri
2021-05-06 2:22 ` Junio C Hamano
2021-05-06 6:07 ` Johannes Sixt
2021-05-06 6:12 ` Yuri
2021-05-06 6:43 ` Johannes Sixt
2021-05-06 6:58 ` Yuri
2021-05-06 8:38 ` Junio C Hamano
2021-05-06 8:41 ` Yuri
2021-05-06 9:09 ` Junio C Hamano
2021-05-06 10:23 ` Felipe Contreras
2021-05-06 8:40 ` Felipe Contreras [this message]
2021-05-06 8:45 ` Yuri
2021-05-06 10:45 ` Felipe Contreras
2021-05-06 14:10 ` Theodore Ts'o
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=6093ab6bd3ea8_24e620862@natae.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=yuri@rawbw.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.