GitHub READ ME編集後エラー
エラー文(Git Hub上でREAD ME編集後)(かわいい絵文字をつけました)
git push後
To github.com:tamam03/style.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'github.com:tamam03/style.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
??
git statusしてみる
git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
???今行ったcommitあるよ言われてる
一旦この記事から
echo 'style' > README からの
git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
README
ほう・・?
https://qiita.com/zenfumi/items/7425b8e9a807659137ae
次にこちらから
git fetch
git push origin master(今回はmain)
→viエディタ起動。
コマンド切り替え出来ず、
脱出できる方法でとにかくExit→commit "N"など・・・
最終的にgit push できるようになったが
git status時
On branch main
Your branch is up to date with 'origin/main'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
README
こちらが表示されるように・・・
Gitしっかりまとめてみます。
まず
①ローカルブランチ
・・・ローカルリポジトリにあるブランチ