save -u --include--untracked untracked ϑΝΠϧ stash ͢Δɻ $ touch test $ ls moge test $ git stash save stash-test No local changes to save $ git stash save -u stash-test Saved working directory and index state On master: stash- HEAD is now at 5a4a0a0 commit $ ls moge
-i exec αϙʔτ $ git rebase -i test pick c043a7d Add X pick ae24543 Add Y exec cat data0 pick 8d81049 Add Z pick 1e27bd2 Add C ...... Executing: cat data0 X Y Successfully rebased and updated refs/heads/master.
index HEAD hard R R R mixed - R R soft - - R merge R0 R R keep R1 R R R: Reset R0: WC ͱ index ͷͲͪΒ͔͕ HEAD ͱҟͳΔ ߹ʹΤϥʔʹͳΔɻadd ͞Εͨͷ WC ʹ Δɻ R1: WC ͷΈͷมߋΤϥʔʹͳΔɻWC ͱ index ͷมߋϦηοτ͞ΕΔɻ add ͞Εͨͷফ͞ΕΔɻ
طʹ͋ΔίϛοτΛνΣ οΫΞτ͍ͯ͠Δϒϥ ϯνʹద༻͍ͨ͠߹ʹ͍·͢ɻྫ͑ master ϒϥϯνͰ͋ΔόάΛमਖ਼ͨ͠ɻͦΕ͕ίϛοτ A ͩͱ͠·͢ɻͦͷόάϦϦʔε༻ϒϥϯνʹ ͋Δ͜ͱ͕Θ͔͍͍ͬͯͯͨ͠ɻίϛοτ A ΛϦϦʔε༻ϒϥϯνʹద༻͢Δ͜ͱΑʹͬͯम ਖ਼͞ΕΔͳΒɺϦϦʔε༻ϒϥϯνͰ git cherry-pick A ͱ࣮ߦ͢Δɻ