1
This commit is contained in:
@@ -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
|
||||||
1. git init
|
1. git init
|
||||||
|
|
||||||
@@ -14,4 +26,6 @@
|
|||||||
1. git commit -m "Commit message"
|
1. git commit -m "Commit message"
|
||||||
|
|
||||||
6. 提交到仓库
|
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 直接推送)
|
||||||
|
|||||||
Reference in New Issue
Block a user