Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
test-vscode-c-win
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸大学计算机学院
教师群组
赵鹏翀-zpc
test-vscode-c-win
提交
afc90034
提交
afc90034
3月 18, 2021
创建
作者:
305350171@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交作业
上级
608c4b35
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
33 行增加
和
1 行删除
+33
-1
tasks.json
.vscode/tasks.json
+1
-1
checkgituserconfig.py
checkgituserconfig.py
+22
-0
checkgituserconfig.sh
checkgituserconfig.sh
+10
-0
没有找到文件。
.vscode/tasks.json
浏览文件 @
afc90034
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
{
{
"label"
:
"查看Git中的用户配置用户信息"
,
"label"
:
"查看Git中的用户配置用户信息"
,
"type"
:
"shell"
,
"type"
:
"shell"
,
"command"
:
"
git config --global user.name && git config --global user.email
"
,
"command"
:
""
,
"args"
:
[],
"args"
:
[],
"group"
:
"build"
,
"group"
:
"build"
,
"presentation"
:
{
"presentation"
:
{
...
...
checkgituserconfig.py
0 → 100644
浏览文件 @
afc90034
#!/bin/env python
# -*- coding: utf-8 -*-
import
difflib
import
sys
import
argparse
import
webbrowser
import
os
import
filecmp
import
subprocess
import
platform
if
__name__
==
"__main__"
:
count
=
os
.
popen
(
'(git config --global user.name && git config --global user.email) | wc -l'
)
.
readline
()
if
int
(
count
)
==
2
:
print
(
"已配置git的用户名和邮箱"
)
else
:
print
(
"请在终端中使用以下命令在配置git的用户名和邮箱"
)
print
(
"git config --global user.name
\"
xxx
\"
"
)
print
(
"git config --global user.email
\"
xxx
\"
"
)
\ No newline at end of file
checkgituserconfig.sh
0 → 100755
浏览文件 @
afc90034
a
=
$((
git config
--
global user.name
&&
git config
--
global user.email
)
|
wc
-
l
)
b
=
1
if
[
$a
-
eq
$b
]
;
then
echo
"已配置git的用户名和邮箱"
else
echo
"请在终端中使用以下命令在配置git的用户名和邮箱"
echo
"git config --global user.name
\"
xxx
\"
"
echo
"git config --global user.email
\"
xxx
\"
"
fi
\ No newline at end of file
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论