2025.10.17(更新日: 2025.10.17)
【git】git remote show originをした時のRemote branchesにnew(next fetch will store in remotes/origin)があった
はじめに
git remote show originは、リモートリポジトリ(この場合は、origin)の詳細情報を確認するコマンド。
今回のgit remote show originの結果
hiroki@shibatahiroshitakanoMacBook-Air python % git remote show origin
* remote origin
Fetch URL: https://github.com/ki-hi-ro/python.git
Push URL: https://github.com/ki-hi-ro/python.git
HEAD branch: main
Remote branches:
main tracked
master new (next fetch will store in remotes/origin)
Local branch configured for 'git pull':
main merges with remote main
Local ref configured for 'git push':
main pushes to main (up to date)
HEAD branch
リモートのデフォルトブランチ。
今回は、HEAD branch: mainとあるので、mainがリモートのデフォルトブランチ。
Remote branches
リモートのブランチの名前と追跡状況。
mainはtrackedなので、追跡している。
masterはnew(next fetch will store in remotes/origin)。
これは、リモートにはmasterが存在しているが、ローカルには記録されていないという意味。
master new (next fetch will store in remotes/origin)
これは、次のフェッチで、masterをローカルのremotes/originに保存しますよという意味。
コメントを残す