Skip to content

Git Tips

averak edited this page May 3, 2023 · 2 revisions

概要

git git の meta meta にするための Tips をまとめました。

Tips

作業ブランチに最新の develop の内容を取り込む

git pull --rebase origin develop

error: cannot pull with rebase: Your index contains uncommitted changes. とエラーが出た場合は、以下のコマンドを打ちましょう。

それでも動かない場合は知りません。

git stash
git pull --rebase origin develop
git stash pop

コミット履歴をきれいにする

歴史をきれいにしてから PR を出さないとモテません。

以下のコマンドの具体的な使い方は詳しい人に聞いてください。

git rebase -i head~{n}