🖥

Git – 現在ブランチの最新コミットハッシュを別ブランチにCherry-pickしてすぐにpushするワンライナーのコマンド例

2024/03/23に公開

コマンド例

  • some_branch に cherry-pick & push する例
current_commit_hash=$(git show --format='%H' --no-patch) && git switch some_branch; git fetch && git reset --hard origin/some_branch && git checkout -b some_branch-$(date +%s) && git cherry-pick $current_commit_hash && git push

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

プロフィール・経歴

https://github.com/YumaInaura/YumaInaura

公開日時

2024-03-22

GitHubで編集を提案

Discussion