Skip to content

Commit d5436e2

Browse files
committed
add bash script
1 parent a1d4cb1 commit d5436e2

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

git_set_username_email.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# 这里改成你的目标配置
4+
NEW_NAME="David Mandy"
5+
NEW_EMAIL="smallprogramzhusir@gmail.com"
6+
7+
git config --global user.name "$NEW_NAME"
8+
git config --global user.email "$NEW_EMAIL"
9+
10+
echo "Git 配置已更新:"
11+
echo "Name: $(git config --global user.name)"
12+
echo "Email: $(git config --global user.email)"
13+
14+
git config --global --list

0 commit comments

Comments
 (0)