查看: 3|回复: 0

[教程] Git 上传 Github 光速入门教程

[复制链接]

0

主题

0

回帖

0

积分

积极分子

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2009-6-9
发表于 2025-5-10 13:24:00 | 显示全部楼层 |阅读模式

配置用户名与邮箱

git config --global user.name "你的GitHub用户名"
git config --global user.email "你的GitHub注册邮箱"

创建新 repo

在 Github 创建新的 repo。

提交

cd 你的项目文件夹路径  # 进入项目目录
git init            # 初始化 Git 仓库
git add .           # 添加所有文件(或指定文件名)
git commit -m "第一次提交"  # 提交并添加注释
git remote add origin https://github.com/你的用户名/仓库名.git
git push -u origin master

代理设置

设置代理

# 假设代理地址是 127.0.0.1:7890(根据你的工具调整)
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890

取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

后续更新代码

git add .
git commit -m "更新说明"
git push


来源:https://www.cnblogs.com/qianxiquq/p/18869522
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部