私は新しい git と GitHub のユーザーです。私はしばらくの間 Windows 用の GitHub を使用してきましたが、改善したいレポでプル リクエストをフォークして送信する方法を学びながら、コマンド ラインをもっと試してみたかったのです。
私が見ているのは、「上流」は使用不可によって定義されているようで、何が起こっているのかを理解したいということです。これは、自分の変更をアップストリーム リポジトリにプルするように要求したい場合に問題になると思います。
GitHub でリポジトリをフォークし、それを自分のコンピューターに複製しました。
git clone https://github.com/mrwweb/CPT-Descriptions.git
次に、新しいリポジトリに入り、フォークチュートリアルにリストされているようにアップストリームを追加しようとしました:
git remote add upstream https://github.com/vanpop/CPT-Descriptions.git
それは私にエラーを与えます:
致命的: リモート アップストリームが既に存在します。
私が試してみると: git fetch upstream
、私はこれを取得します:
致命的: 'upstream' は git リポジトリではないようです
致命的: リモート リポジトリを読み取れませんでした。
正しいアクセス権があり、リポジトリが存在することを確認してください。
git 構成ファイルの編集を提案する他のスレッドを読みましたが、アップストリームについての言及はありません。
[芯]
リポジトリフォーマットバージョン = 0
ファイルモード = false
むき出し = 偽
logallrefupdates = true
シンボリックリンク = false
ignorecase = true
hideDotFiles = dotGitOnly
【リモート「オリジン」】
URL = https://github.com/mrwweb/CPT-Descriptions.git
fetch = +refs/heads/ :refs/remotes/origin/
[ブランチ「マスター」]
リモート = 原点
マージ = refs/heads/master
最後に、試してみると次のgit remote -v
ようになります。
オリジン https://github.com/mrwweb/CPT-Descriptions.git (フェッチ)
オリジン https://github.com/mrwweb/CPT-Descriptions.git (プッシュ)
上流の
=======================
更新: の結果を追加git config -l
:
core.symlinks=false core.autocrlf=true core.editor=gitpad
color.diff=自動 color.status=自動 color.branch=自動
color.interactive=true color.ui=true pack.packsizelimit=2g
help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain rebase.autosquash=true
credential.helper=!github --credentials filter.ghcleansmudge.clean=cat
filter.ghcleansmudge.smudge=cat push.default=上流
alias.dt=difftool alias.mt=mergetool diff.tool=vs11
difftool.prompt=false difftool.bc4.cmd="c:/プログラム ファイル (x86)/beyond
比較 3/bcomp.exe" "$LOCAL" "$ REMOTE" difftool.p4.cmd="c:/program
files/Perforce/p4merge.exe" "$LOCAL" "$REMOTE"
difftool.vs11.cmd="c:/プログラム ファイル (x86)/マイクロソフト ビジュアル スタジオ
11.0/common7/i de/devenv.exe" '//diff' "$LOCAL" "$REMOTE" merge.tool=bc3 mergetool.prompt=false mergetool.keepbackup=false
mergetool.bc3.cmd="c:/プログラム ファイル (x86)/beyond compare 3/bcomp.exe"
"$LOCAL" " $REMOTE" "$BASE" "$MERGED" mergetool.bc3.trustexitcode=true
mergetool.p4.cmd="c:/program files/Perforce/p4merge.exe" "$BASE"
"$LOCAL" "$REMO TE" "$MERGED" mergetool.p4.trustexitcode=false
remote.origin.fetch=+refs/heads/ :refs/remotes/origin/
remote.origin.fetch=+refs/pull/ /head:refs/remotes/origin/pr/
remote.upstream.fetch=+refs/heads/ :refs/remotes/upstream/
remote.upstream.fetch=+refs/pull/ /head:refs/remotes/upstream/pr/
user.name=mrwweb user.email=info@mrwweb.com core.autocrlf=true
core.repositoryformatversion=0 core.filemode=false core.bare=false
core.logallrefupdates=true core.symlinks=false core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url= https://github.com/mrwweb/CPT-Descriptions.git
remote.origin.fetch=+refs/heads/ :refs/remotes/origin/
branch.master.remote=オリジン branch.master.merge=refs/heads/master