1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

git pushできなかったとき

Posted at

問題

ブランチを新規作成してコードを書いた後、git commitをした後にgit push origin mainをしたら、「Everythin up-to-date」と表示されてpushできなかった。

原因

新規作成したブランチがリモートブランチに公開されていない

対処法

 git push --set-upstream origin ブランチ名

これでpushすることができました。

ちなみに、自動的に以下を有効化すると自動的にリモートブランチを設定してくれました。

git config --global --add --bool push.autoSetupRemote true
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?