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
相关推荐
miofly7 小时前
Reflection AI 发布 501B 参数开放权重模型 Beam
开源·github
m4Rk_9 小时前
【论文阅读】Agent 记忆机制(91):THEANINE——不删除过时记忆,让 Agent 记住事情是如何变化的
论文阅读·人工智能·学习·开源·github
高频因子挖掘机10 小时前
批量行情返回后,怎样把请求失败的股票单独挑出来?
后端·github·api
奥德元12 小时前
XiaoMate功能介绍: 让桌宠帮你分析你的桌面屏幕
github
TunerT_TQ12 小时前
【开源评测】dots:自带浏览器的 Web AI Agent——C++ 级反检测路径的工程取舍与争议
github
Maynor在掘金12 小时前
1.9 万 Star 的 Hypit:让 AI Agent 帮你“一键复刻”爆款视频,保姆级上手教程
vue.js·github
嘎嘎风12 小时前
MiniMind 学习笔记之 05 从 768 维到下一个 token
github·源码阅读
高频因子挖掘机12 小时前
盘中筛选要同时看价格和盘口?按需分层比“一次全拿”更好维护
后端·github·api
谁在黄金彼岸13 小时前
2026年第40周GitHub趋势周报
github
Daniel_12313 小时前
轻量级站点监控面板 LightPing 开源啦
前端·后端·github