Doesn't look like you can, though git p4
, instead you'll need to do it through Perforce.
How to unshelve changes using git-p4
문제
Latest git-p4 script (https://github.com/ermshiperete/git-p4) has a "shelve" but no "unshelve" command. How do I unshelve changes using it?
해결책
다른 팁
Since Git 2.18 (Q2 2018), there is a git p4 unshelve
command
Unshelving will take a shelved P4 changelist, and produce the equivalent
git commit
in the branchrefs/remotes/p4/unshelved/<changelist>
.
But it was flawed:
The "unshelve
" subcommand of "git p4
(man)" used incorrectly used commit^N
where it meant to say commit~N
to name the N
th generation ancestor, which has been corrected with Git 2.29 (Q4 2020).
See commit 0acbf59, commit 677fa8d (19 Sep 2020) by Luke Diamand (ldiamand42
).
(Merged by Junio C Hamano -- gitster
-- in commit 9f4588d, 25 Sep 2020)
git-p4 unshelve
: adding a commit breaksgit-p4 unshelve
Signed-off-by: Luke Diamand
git-p4 unshelve
usesHEAD^$n
to find the parent commit, which fails if there is an additional commit.