LoginSignup
0
1

More than 5 years have passed since last update.

git pushが失敗したとき

Last updated at Posted at 2018-02-07

覚え書きとして。

リモートからgit pull し忘れて作業をしてしまい、git push しようとしてrejectを食らう、という事案。

ついうっかりやってしまった時の対処。

そういう時は、「リモートの変更を先に受けてからこっちの変更をマージしてpushしなおしたい」という方針であれば

git pull --rebase origin (ブランチ名)

で対処上記コマンドの後にpushをしてやる。

コンフリクト発生の場合などは別途対処が必要だが、解決案の一つとして認めておきます。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1