git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Create a new commit from patches without using any worktree?
@ 2010-10-27  1:49 Klas Lindberg
  2010-10-27  2:58 ` Jonathan Nieder
  2010-10-27  9:07 ` Johannes Sixt
  0 siblings, 2 replies; 5+ messages in thread
From: Klas Lindberg @ 2010-10-27  1:49 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-27 15:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27  1:49 Create a new commit from patches without using any worktree? Klas Lindberg
2010-10-27  2:58 ` Jonathan Nieder
2010-10-27  9:07 ` Johannes Sixt
2010-10-27 10:28   ` Bert Wesarg
2010-10-27 15:20   ` Klas Lindberg

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