Skip to content

Commit

Permalink
设置用户身份相关信息
Browse files Browse the repository at this point in the history
  • Loading branch information
magicianlib committed Apr 10, 2024
1 parent 46f3ddc commit 0c32852
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.obsidian
33 changes: 33 additions & 0 deletions 设置用户身份相关信息.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# 全局设置

```bash
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

# 查看全局配置
git config --global --list
```

# 项目级别

编辑项目下 .git/config 配置文件:

```bash
$ vim .git/config
```

设置用户信息:

```bash
[user]
name="Your Name"
email="[email protected]"
```

也可以在项目级别通过执行如下命令实现等效配置:

```bash
git config user.name "Your Name"
git config user.email "[email protected]"
```

0 comments on commit 0c32852

Please sign in to comment.