This commit is contained in:
LL
2025-11-27 09:35:46 +08:00
parent 83b961be14
commit e2574c99ae

View File

@@ -1,3 +1,15 @@
配置用户信息
# 全局配置(所有项目生效)
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# 仅当前项目配置(优先级更高)
git config user.name "Project Name"
1. 初始化git
1. git init
@@ -14,4 +26,6 @@
1. git commit -m "Commit message"
6. 提交到仓库
1. git push origin <name>
1. git push origin <name>
2. git push origin main # 推送本地 main 分支到远程 origin
3. git push -u origin feature/login # 第一次推送时设置上游分支(后续可用 git push 直接推送)