From: Klas Lindberg <klas.lindberg@gmail.com>
To: git@vger.kernel.org
Subject: Create a new commit from patches without using any worktree?
Date: Wed, 27 Oct 2010 03:49:12 +0200 [thread overview]
Message-ID: <AANLkTi=Xi13_0+bC-TVRP3uVDmGWVdM3a708=SSzCR88@mail.gmail.com> (raw)
Hello
Is there any way to record a new commit based on contents in a patch
without going through a worktree? Of course the operation would have
to fail if the patch does not apply cleanly. The problem is I find
myself doing things like this:
put away current work on some branch A
checkout some branch B that is only used for patching
run git patch --check to see if patches apply cleanly. *reject* if
not. apply otherwise.
return to branch A.
I.e. the checkout of B is redundant because I'm anyway not going to
try to resolve any conflicts.
I know I can do something similar to what I need with "git-fetch
src:dst", except it's rather awkward if what you have is patches. I
suspect there must be some way to mimic that fetch behaviour manually,
and in a way that lets me choose exactly what to apply?
BR / Klas
next reply other threads:[~2010-10-27 1:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 1:49 Klas Lindberg [this message]
2010-10-27 2:58 ` Create a new commit from patches without using any worktree? Jonathan Nieder
2010-10-27 9:07 ` Johannes Sixt
2010-10-27 10:28 ` Bert Wesarg
2010-10-27 15:20 ` Klas Lindberg
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='AANLkTi=Xi13_0+bC-TVRP3uVDmGWVdM3a708=SSzCR88@mail.gmail.com' \
--to=klas.lindberg@gmail.com \
--cc=git@vger.kernel.org \
/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 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 NNTP newsgroup(s).