git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Yuri <yuri@rawbw.com>, Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j6t@kdbg.org>, 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 05:23:07 -0500	[thread overview]
Message-ID: <6093c38b7ca62_325720884@natae.notmuch> (raw)
In-Reply-To: <f1bf3086-8c89-f0af-c0c7-f427a935771f@rawbw.com>

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
it.

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

Yes.

-- 
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 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* 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 \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=yuri@rawbw.com \
    --subject='Re: [feature suggestion] Add '\''git stash export'\'', '\''git stash import'\'' commands to allow to backup stash externally' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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).