添加和删除git全局配置(git config --global)

添加和删除git全局配置(git config --global)

1.添加git全局范围的用户名和邮箱:

git config --global user.email drizzly-ni@163.com
git config --global user.name drizzly-ni

2.配置完确定下查看:
看全局:

git config --global -l

可以看出下面就是正常的:

user.email=drizzly-ni@163.com
user.name=drizzly-ni
看所有的:

git config -l



3.删除全局git

git config --global --unset user.name
git config --global --unset user.email

如果不行,建议删除.git文件重新进行配置邮箱与用户名,并初始化文件

PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git config --global user.name drizzly-ni
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git config --global user.email 3067181552@qq.com 
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git log
fatal: not a git repository (or any of the parent directories): .git
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2>
git init
Initialized empty Git repository in C:/Users/彩珍/Desktop/project/vue3.5+echarts5/vue3.2/.git/
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2>
git log 
fatal: your current branch 'master' does not have any commits yet
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2>
git add .
warning: in the working copy of '.browserslistrc', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.editorconfig', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.eslintrc.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'babel.config.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'jsconfig.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'package-lock.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'package.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/index.html', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/App.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/components/HelloWorld.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/router/index.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/store/index.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/views/AboutView.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/views/HomeView.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'vue.config.js', LF will be replaced by CRLF the next time Git touches it
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   .browserslistrc
        new file:   .cz-config.js
        new file:   .editorconfig
        new file:   .eslintrc.js
        new file:   .gitignore
        new file:   .prettierrc
        new file:   README.md
        new file:   babel.config.js
        new file:   jsconfig.json
        new file:   package-lock.json
        new file:   package.json
        new file:   public/favicon.ico
        new file:   public/index.html
        new file:   src/App.vue
        new file:   src/assets/logo.png
        new file:   src/components/HelloWorld.vue
        new file:   src/main.js
        new file:   src/router/index.js
        new file:   src/store/index.js
        new file:   src/views/AboutView.vue
        new file:   src/views/HomeView.vue
        new file:   vue.config.js

PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git log
fatal: your current branch 'master' does not have any commits yet
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2>
git config --global -l
user.email=3067181552@qq.com
user.name=drizzly-ni
credential.https://gitee.com.provider=generic
credential.https://git.code.tencent.com.provider=generic
core.editor=Vim
http.sslverify=false
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2>
git cz

cz-cli@4.2.4, cz-customizable@6.3.0

All lines except first will be wrapped after 100 characters.
? 请选择提交类型(必填) feat:    
新功能
? 请输入文件修改范围(可选) 
? 请简要描述提交(必填) 测试

###--------------------------------------------------------###
feat: 测试
###--------------------------------------------------------###

? 确定提交此说明吗?(y/n/e/h) Yes
[master (root-commit) 7b47f10] feat: 测试
 22 files changed, 23862 insertions(+)
 create mode 100644 .browserslistrc
 create mode 100644 .browserslistrc
 create mode 100644 .cz-config.js
 create mode 100644 .editorconfig
 create mode 100644 .eslintrc.js
 create mode 100644 .gitignore
 create mode 100644 .prettierrc
 create mode 100644 README.md
 create mode 100644 babel.config.js
 create mode 100644 jsconfig.json
 create mode 100644 package-lock.json
 create mode 100644 package.json
 create mode 100644 public/favicon.ico
 create mode 100644 public/index.html
 create mode 100644 src/App.vue
 create mode 100644 src/assets/logo.png
 create mode 100644 src/components/HelloWorld.vue
 create mode 100644 src/main.js
 create mode 100644 src/router/index.js
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScrnpm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now.npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now.ipt developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated
 Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s
npm WARN deprecated
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s


added 71 packages in 11s


191 packages are looking for funding
  run `npm fund` for details

PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git config --global user.name drizzly-ni
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git config --global user.email 3067181552@qq.com 
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git log
fatal: not a git repository (or any of the parent directories): .git
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git init
Initialized empty Git repository in C:/Users/彩珍/Desktop/project/vue3.5+echarts5/vue3.2/.git/
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git log 
fatal: your current branch 'master' does not have any commits yet
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git add .
warning: in the working copy of '.browserslistrc', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.editorconfig', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.eslintrc.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'babel.config.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'jsconfig.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'package-lock.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'package.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/index.html', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/App.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/components/HelloWorld.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/router/index.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/store/index.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/views/AboutView.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/views/HomeView.vue', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'vue.config.js', LF will be replaced by CRLF the next time Git touches it
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   .browserslistrc
        new file:   .cz-config.js
        new file:   .editorconfig
        new file:   .eslintrc.js
        new file:   .gitignore
        new file:   .prettierrc
        new file:   README.md
        new file:   babel.config.js
        new file:   jsconfig.json
        new file:   package-lock.json
        new file:   package.json
        new file:   public/favicon.ico
        new file:   public/index.html
        new file:   src/App.vue
        new file:   src/assets/logo.png
        new file:   src/components/HelloWorld.vue
        new file:   src/main.js
        new file:   src/router/index.js
        new file:   src/store/index.js
        new file:   src/views/AboutView.vue
        new file:   src/views/HomeView.vue
        new file:   vue.config.js

PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git log
fatal: your current branch 'master' does not have any commits yet
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git config --global -l
user.email=3067181552@qq.com
user.name=drizzly-ni
credential.https://gitee.com.provider=generic
credential.https://git.code.tencent.com.provider=generic
core.editor=Vim
http.sslverify=false
PS C:\Users\彩珍\Desktop\project\vue3.5+echarts5\vue3.2> git cz

cz-cli@4.2.4, cz-customizable@6.3.0

All lines except first will be wrapped after 100 characters.
? 请选择提交类型(必填) feat:     新功能
? 请输入文件修改范围(可选) 
? 请简要描述提交(必填) 测试

###--------------------------------------------------------###
feat: 测试
###--------------------------------------------------------###

? 确定提交此说明吗?(y/n/e/h) Yes
[master (root-commit) 7b47f10] feat: 测试
 22 files changed, 23862 insertions(+)
 create mode 100644 .browserslistrc
 create mode 100644 .browserslistrc
 create mode 100644 .cz-config.js
 create mode 100644 .editorconfig
 create mode 100644 .eslintrc.js
 create mode 100644 .gitignore
 create mode 100644 .prettierrc
 create mode 100644 README.md
 create mode 100644 babel.config.js
 create mode 100644 jsconfig.json
 create mode 100644 package-lock.json
 create mode 100644 package.json
 create mode 100644 public/favicon.ico
 create mode 100644 public/index.html
 create mode 100644 src/App.vue
 create mode 100644 src/assets/logo.png
 create mode 100644 src/components/HelloWorld.vue
 create mode 100644 src/main.js
 create mode 100644 src/router/index.js
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScrnpm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now.npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now.ipt developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated
 Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s
npm WARN deprecated
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

added 71 packages in 11s


added 71 packages in 11s


191 packages are looking for funding
  run `npm fund` for details

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值