Http:git config --global http.proxy http://127.0.0.1:7897
Https:git config --global https.proxy https://127.0.0.1:7897
取消代理:git config --global --unset http.proxy
取消https代理:git config --global --unset https.proxy
2025/11/30小于 1 分钟
Http:git config --global http.proxy http://127.0.0.1:7897
Https:git config --global https.proxy https://127.0.0.1:7897
取消代理:git config --global --unset http.proxy
取消https代理:git config --global --unset https.proxy
1 ) type(必须) : commit 的类别,只允许使用下面几个标识:- feat : 新功能
git查看配置信息
git config -list
配置 git config --global user.email "内容"
git config --global user.name "内容"
vscode使用github
GitHub Pull Requests插件
按 Ctrl+Shift+P 输入 GitHub,发布到github,选择浏览器授权
连接上github
ssh连接(推荐)
首先将本地分支回退到想要的版本
例如vs2022中:
重置,删除更改
git push origin master -f
Git 是一个 分布式版本控制系统,用于:
核心理念:
👉 每个人都是一个完整仓库,分布式,安全快速。
Git 有三大区域:
| 区域 | 作用 |
|---|---|
| 工作区(Working Directory) | 你能看到并编辑的文件 |
| 暂存区(Staging Area) | 计划提交的文件 |
| 本地仓库(Local Repository) | 你的本地提交历史 |
| 远程仓库(Remote Repository) | GitHub / Gitee 上的仓库 |