0
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?

failed to push some refs to 'https://github.com/〇〇〇.git'

Last updated at Posted at 2025-10-26

今現在、作業しているローカルリポジトリがonedriveの中にあったため権限が拒否される事案が度々発生したため、onedrive下ではないところにcloneで新たにローカルリポジトリを作成し、再度githubと連携する準備中。
おそらく連携は、できているはず…。
スクリーンショット 2025-10-26 040309.png

変更した内容でローカルリポジトリからリモートリポジトリへ反映させようとしたところ!!!
スクリーンショット 2025-10-26 040523.png

先人たちの英知を調べてみたところ、
状態として、「リモートリポジトリのほうが先に別の変更されており、ローカルの変更と嚙み合わなくなっている。」といった状態。

一旦対応策としてこちらで実施。
image.png
【chatgptに頼りました…。】

一つずつコードの内容を確認。
git remote-v
→今どこのリモートリポジトリと連携しているか確認。
git fetch origin
→リモートの最新状態を「ダウンロードするだけ。」
git status
→ローカルでの作業状況の確認。言い換えると、ローカルとリモートでの差分を確認。

image.png
イメージとしては、ローカルとリモートの分岐点を表示する。

ここまで終了後、
git rebase origin/main
で、既存のリモートに新しく作ったローカルの内容を上げようとしたところ…。

スクリーンショット 2025-10-26 043702.png

うむうむ中々上手くいかない…。一旦これで投稿します!!!

0
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
0
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?