github使用记录

1. 首次上传本地项目到 GitHub

1.1 准备 GitHub 仓库

复制代码
登录 GitHub,点击右上角 + → New repository

输入仓库名称(建议与本地目录同名)

选择公开(Public)或私有(Private)

不要勾选 "Initialize this repository with a README"

点击创建

1.2 初始化本地仓库

复制代码
# 进入项目目录
cd /path/to/your/project

# 初始化Git仓库
git init

# 添加所有文件到暂存区
git add .

# 提交更改(添加注释)
git commit -m "Initial commit"

1.3 添加远程仓库

复制代码
# 添加远程仓库(替换username和reponame)
git remote add origin https://github.com/<username>/<reponame>.git

1.4 添加令牌访问远程仓库

复制代码
git remote set-url origin https://<token>@github.com/<username>/<reponame>.git

## token:创建好的令牌号
## 参考: https://blog.csdn.net/weixin_44415582/article/details/131503585

1.5 推送代码

复制代码
# 首次推送需要指定上游分支
git push -u origin main

如果push不上,可以添加代理端口:
参考:https://blog.csdn.net/weixin_43914200/article/details/121316043
相关推荐
峰向AI5 小时前
腾讯开源的AI管理的瑞士军刀:让团队经验自动传承
github
Howie_05267 小时前
AI-test-agent(一)刚入门测试也能读懂:一个基于 LangGraph + Playwright 的开源测试工作台
github
zhurui_xiaozhuzaizai7 小时前
github上关于节省token的项目一览,上下文压缩,节省token,agent优化skill,热门项目
人工智能·深度学习·github
旧梦星轨7 小时前
Git Flow 工作流实践
git·gitee·gitlab·github
QUOR7 小时前
ZorvAI · GenUI 技术构架与功能介绍
html·github
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 周榜(2026-09-12)
ai·大模型·llm·github·agent
喵叔哟9 小时前
从 Prompt 到可执行规格:认识 GitHub Spec Kit
驱动开发·prompt·github
旧梦星轨10 小时前
Github Flow 与 Gitlab Flow工作流实践解读
gitlab·github
wangruofeng20 小时前
120+ 个 Agent Skill 管不过来?我造了套「包管理器」:仓库是源,链接是安装
github·aigc·ai编程
七牛云行业应用20 小时前
Cursor Origin发布:同一天GitHub宕机,AI原生代码托管来了
人工智能·github·agent·ai编程·ai-native