首页 > 其他分享 >vs code 提交代码弹框提示:请确保已在git中配置您的“user.name”和“user.email” ——解决方法

vs code 提交代码弹框提示:请确保已在git中配置您的“user.name”和“user.email” ——解决方法

时间:2023-02-27 09:33:46浏览次数:36  
标签:git name 配置 code user config email

修改完项目代码,准备提交到git上,结果提交失败,弹框提示:请确保已在Git中配置您的“user.name”和“user.email”

打开终端,配置运行一下命令

$ git config --global user.name "your_username"  # 配置用户名
$ git config --global user.email "your_email"  # 配置邮箱

以上是全局配置“user.name”和“user.email”的命令,如果想要配置单个项目git的“user.name”和“user.email”,打开终端,进到该项目目录下,运行命令:  

1 $ git config user.name "your_username"
2 $ git config user.email "your_email"

 

配置完,查看git中配置的用户名和邮箱,看看是否配置成功

$ git config user.name
$ git config user.email

  

标签:git,name,配置,code,user,config,email
From: https://www.cnblogs.com/jspang/p/17158583.html

相关文章

  • [LeetCode] 1333. Filter Restaurants by Vegan-Friendly, Price and Distance 餐厅过
    Giventhearray restaurants where restaurants[i]=[idi,ratingi,veganFriendlyi,pricei,distancei].Youhavetofiltertherestaurantsusingthreefilte......
  • 【DFS】LeetCode 52. N 皇后 II
    题目链接52.N皇后II思路与52.N皇后II一致代码classSolution{privateintresult;privateboolean[]mainDiag;privateboolean[]subDiag;......
  • 【转载】vsCode JS代码格式化插件ESlint
    验证有效,Ctrl+S保存代码全格式化了。写这个主要是个人笔记,算不得重复造。转载自:https://blog.csdn.net/qq_34803821/article/details/849727811、安装插件VSCode中打开......
  • 【DFS】LeetCode 51. N 皇后
    题目链接51.N皇后思路代码classSolution{privateList<List<String>>result;privateboolean[]mainDiagonal;privateboolean[]subDiagonal;......
  • AtCoder Beginner Contest 291
    比赛链接A-camelCase题目大意给一个由英文字母构成的字符串\(S\),\(S\)中只有一个大写字母,输出该大写字母是字符串中第几个字母。题目思路遍历字符串找出大写字母......
  • Codeforces Global Round 15 CF1552 A~G 题解
    点我看题对两三年前的cf进行考古的时候偶然做到这场,像这种全是构造题和思维题的比赛还是比较少见的。题目本身很有意思,但是对于现场打比赛想上分的人来说体验就比较差了。......
  • 关于vs code的卸载
    今天为了配置git把vsc的环境搞得有些乱七八糟,于是想着重装一下,可是卸载后重新安装还是之前那样,无奈上网查资料,发现除了安装目录之外,还要删除两个文件夹:C:\Users\admin\.vsc......
  • LeetCode76. 最小覆盖子串(/滑动窗口)
    原题解题目约束题解classSolution{public:unordered_map<char,int>ori,cnt;boolcheck(){for(constauto&p:ori){......
  • [LeetCode]4. 寻找两个正序数组的中位数
    给定两个大小分别为m和n的正序(从小到大)数组nums1和nums2。请你找出并返回这两个正序数组的中位数。算法的时间复杂度应该为O(log(m+n))。分别查找两个数组的......
  • leetcode 739每日温度
    classSolution{public:vector<int>dailyTemperatures(vector<int>&temperatures){vector<int>res;inttt=0;inttemp[100010];......