Create a new commit from patches without using any worktree?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]