git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2021, 09:09 UTC
Message-ID
<xmqqy2csxm7n.fsf@gitster.g>
In-Reply-To
<f1bf3086-8c89-f0af-c0c7-f427a935771f@rawbw.com>
Yuri <yuri@rawbw.com> writes:
Show 12 quoted lines
> On 5/6/21 1:38 AM, Junio C Hamano wrote:
>> Unlike centralized SCM like SVN and CVS, commits in Git are private
>> until you make them public by pushing, and you do not allow other
>> people to fetch/pull from the repository you actively work in.  If
>> your commits become public immediately after you make them, perhaps
>> there is a room in your workflow for vast improvement.
>
>
> Let's say I make commit1, commit2, commit3 and then commit4.
>
>
> How can I push only commit1 and commit3, but not commit2 and commit4?
You don't.
> Can I permanently hold some commits from being pushed while pushing others?

Yes, you arrange these unrelated things (e.g. if commit1 and commit3 can become ready to be used without commit2 and commit4, there is *no* reason to build commit2 as a direct child of commit1 *AND* build commit3 as a direct child of commit2) into multiple branches, keep unrelated things separate and related things together, and push the branch commit1 & commit3 are on (obviously in your example they become ready to be consumed together while commit2 or commit4 are not, so they wouldn't be on the same commit as commit2 or commit4).

Previous: YuriNext: Felipe Contreras
Message 11 of 16 in “[feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally”
  1. YuriMay 5, 2021
  2. Randall S. BeckerMay 5, 2021
  3. YuriMay 5, 2021
  4. Junio C HamanoMay 6, 2021
  5. Johannes SixtMay 6, 2021
  6. YuriMay 6, 2021
  7. Johannes SixtMay 6, 2021
  8. YuriMay 6, 2021
  9. Junio C HamanoMay 6, 2021
  10. YuriMay 6, 2021
  11. Junio C HamanoMay 6, 2021
  12. Felipe ContrerasMay 6, 2021
  13. Felipe ContrerasMay 6, 2021
  14. YuriMay 6, 2021
  15. Felipe ContrerasMay 6, 2021
  16. Theodore Ts'oMay 6, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.