mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <>
To: Yuri <>, Junio C Hamano <>
Cc: Johannes Sixt <>, Git Mailing List <>
Subject: Re: [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally
Date: Thu, 06 May 2021 05:23:07 -0500	[thread overview]
Message-ID: <6093c38b7ca62_325720884@natae.notmuch> (raw)
In-Reply-To: <>

Yuri wrote:
> 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 create a separate branch "for-upstream" based on the parent of
commit 1.

Then you chery-pick commit 1 and commit 3.

You can leave the other branch as-is, and deal with that later, or you
can rebaste that temporary branch on top of "for-upstream".

Or you can rebase first, create a new branch from tmp~2, and then push

> Can I permanently hold some commits from being pushed while pushing
> others?


Felipe Contreras

  parent reply	other threads:[~2021-05-06 10:23 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 [this message]
2021-05-06  8:40         ` Felipe Contreras
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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6093c38b7ca62_325720884@natae.notmuch \ \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).