Git 上传 Github 光速入门教程
配置用户名与邮箱
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

浙公网安备 33010602011771号