查看: 15|回覆: 0

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

[複製鏈接]

3

主題

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.

在本版发帖返回顶部