12.ローカルリポジトリ(mainブランチ)(の変更)を送信して、リモートリポジトリ(「origin」上の同名ブランチ)へ反映させる / 迷走作業失敗履歴

カテゴリー: Git BASH  閲覧数:173 配信日:2022-10-20 23:45


ローカルリポジトリ(mainブランチ)(の変更)を送信して、リモートリポジトリ(「origin」上の同名ブランチ)へ反映させる



$ git push origin main
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 414.44 KiB | 6.19 MiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
  08bd5d3..aa8864c  main -> main



迷走作業失敗履歴


$ git push origin main
To github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'github.com:GitHubユーザー名/P25-Second-Ranking-Service.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 pull origin main
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 640 bytes | 5.00 KiB/s, done.
From github.com:GitHubユーザー名/P25-Second-Ranking-Service
* branch            main       -> FETCH_HEAD
* [new branch]      main       -> origin/main
fatal: refusing to merge unrelated histories


$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

   git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

   git branch --set-upstream-to=origin/<branch> main


$ git log
commit 260333cb254bdd66b52557fa197e9498c3030d1b (HEAD -> main)
Author: GitHubユーザー名 <★★>
Date:   Thu Oct 20 21:43:05 2022 +0900

   first commit


$ git push origin main
To github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:GitHubユーザー名/P25-Second-Ranking-Service.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

   git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

   git branch --set-upstream-to=origin/<branch> main


$ git branch
* main


$ git pull main
fatal: 'main' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


$ git pull Default
f
atal: 'Default' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


$ git pull origin main
From github.com:GitHubユーザー名/P25-Second-Ranking-Service
* branch            main       -> FETCH_HEAD
fatal: refusing to merge unrelated histories


$ git pull origin branch
fatal: couldn't find remote ref branch


$ git pull branch
fatal: 'branch' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


$ git remote -v
origin  git@github.com:GitHubユーザー名/P25-Second-Ranking-Service.git (fetch)
origin  git@github.com:GitHubユーザー名/P25-Second-Ranking-Service.git (push)


$ git config --list
http.sslcainfo=L:/9.soft/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager-core
core.longpaths=true
core.autocrlf=false
core.fscache=true
core.symlinks=false
core.fsmonitor=true
pull.rebase=false
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=main
user.name=GitHubユーザー名
user.email=★★
core.autocrlf=false
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
safe.directory=L:/1_Hp/0_sakura/2018server/var
safe.directory=L:/1_Hp/0_sakura/2018server/var/www/html/1-p41
safe.directory=L:/9.soft/Git
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd=''
mergetool.sourcetree.trustexitcode=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=git@github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*


$ git config remote.origin.url
git@github.com:GitHubユーザー名/P25-Second-Ranking-Service.git


$ git status
On branch main
nothing to commit, working tree clean


$ git branch -a
* main
 remotes/origin/main


$ git pull branch main
fatal: 'branch' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


$ git fetch

$ git merge origin/main
fatal: refusing to merge unrelated histories


$ git push origin main
To github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:GitHubユーザー名/P25-Second-Ranking-Service.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'github.com:GitHubユーザー名/P25-Second-Ranking-Service.git'


$ git log
commit 260333cb254bdd66b52557fa197e9498c3030d1b (HEAD -> main)
Author: GitHubユーザー名 <★★>
Date:   Thu Oct 20 21:43:05 2022 +0900

   first commit


$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

   git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

   git branch --set-upstream-to=origin/<branch> main


$ git branch --set-upstream-to=origin/<branch> main
bash: branch: No such file or directory


$ git branch --set-upstream-to=origin/ main
fatal: the requested upstream branch 'origin/' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
hint: Disable this message with "git config advice.setUpstreamFailure false"


$ git branch --set-upstream-to=origin/main
branch 'main' set up to track 'origin/main'.


$ git push origin main
To github.com:GitHubユーザー名/P25-Second-Ranking-Service.git
! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:GitHubユーザー名/P25-Second-Ranking-Service.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


$ git pull origin main
From github.com:GitHubユーザー名/P25-Second-Ranking-Service
* branch            main       -> FETCH_HEAD
fatal: refusing to merge unrelated histories


$ git pull origin branch
fatal: couldn't find remote ref branch


週間人気ページランキング / 11-16 → 11-22
順位 ページタイトル抜粋 アクセス数
1 「Twitter API」は、2023 年 5 月 10 日時点では、SMS認証(電話番号登録)不要でプロジェクト作成できるよう仕様変更されています。 | Twitter API (Twitter) 1
1 和田晃一良 年表 1
1 Webサービス開発 カテゴリー 1
1 コインチェック株式会社   | Webサービスビジネス 1
1 「Twitterデータ」対応 | Twitter Developer(Twitter) 1
1 ANRIとは? / ジェネラルパートナー株式会社 1
1 理由 / 投稿削除できない / 質問の基準が不明 / QAサイトなのに、やってほしいことだけを記載してはいけない 1
1 Twitter API v1.1 | Twitter Developer(Twitter) 1
1 fatal: remote error: is not a valid repository name | Git BASH(Git) 1
1 大前提 / 問題発生 /「Twitter アカウント開設」では認証メールが届くが「Twitter Developersアカウント開設」では認証メールが届かない具体例 1
1 比較 / gitk / git-gui 1
1 「Twitter アカウント開設」のために受信可能なメールアドレスと、「Twitter Developersアカウント開設」のために受信可能なメールアドレスは仕様が異なる(と思われる) | Twitter Developer(Twitter) 1
1 開発 0 1
1 「既存Twitterアプリが使用できる」からと言って「Twitter開発者アカウント」を保持しているとは限らない | Twitter Developer(Twitter) 1
2024/11/23 1:02 更新
指定期間人気ページランキング / 2020-5-27 → 2024-11-22
順位 ページタイトル抜粋 アクセス数
1 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(開発環境) 982
2 fatal: remote error: is not a valid repository name | Git BASH(開発環境) 706
3 Twitter アカウント管理 | Twitter Developer(Twitter) 606
4 動画対応 | プログラミング 587
5 Twitter API | Twitter API (Twitter) 583
6 開発 0 549
7 「Twitterデータ」対応 | Twitter Developer(Twitter) 535
8 本 | ブックマーク 438
9 Windows10で使用できるGitクライアント | GitHub(開発環境) 418
10 Webサービス | ブックマーク 417
11 マッチングサービス | Webサービスビジネス 401
12 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 331
13 技術書籍 | プログラミング 297
13 TwitterOAuth では、画像URL を指定した画像投稿は出来ない(と思う)。ライブラリを使用しなければ出来るから、Twitter API の制限ではない(と思われる)  | Twitter 297
14 気になった動画 | ブックマーク 289
15 teratailでは質問しない | プログラミング 280
16 埋め込みツイート | Twitter Developer(Twitter) 270
17 個人事業主 | Webサービスビジネス 250
18 Twitter 電話番号の問題 | Twitter Developer(Twitter) 219
19 過去の「0文字引用RT」を期間指定して取得しようとするも、挫折 | Twitter API (Twitter) 189
2024/11/23 1:02 更新