* main e1f2a3d [origin/main: ahead 2] 修复登录页样式
dev 4b5c6d9 [origin/dev] 新增用户权限模块
[origin/main: ahead 2] 表示本地分支 main 比远程分支 origin/main 多 2 个提交。
5. 查看远程仓库详细信息(含分支状态)
git remote show origin
输出示例:
* remote origin
Fetch URL: git@github.com:user/repo.git
Push URL: git@github.com:user/repo.git
HEAD branch: main
Remote branches:
main tracked
dev tracked
feature stale (use 'git remote prune' to remove)
Local branches configured for 'git pull':
main merges with remote main
dev merges with remote dev
Local refs configured for 'git push':
main pushes to main (up to date)
dev pushes to dev (local out of date)