git常用命令

cd ***  改变目录至***

cd .. 返回上一级目录

touch index.html  当前目录下创建文件

mkdir ***  创建***文件夹

mv 谁  谁   移动文件到哪个文件里

ls 列出当前目录中的所有文件   ll列出的更加详细

rm 删除一个文件  rm index.html

rm -r 删除一个文件夹   rm -r test

reset 重新初始化终端/清屏  类似于clear 但是属于重启

clear 清平

history 查看命令历史

help 帮助

exit 退出

# 表示注释 不要乱写

查看所有配置

git config-l

查看系统配置文件

git config --system --list

查看当前用户(global)配置

git congih --global --list

Git相关配置文件

Gitetcgitconfig  : Git安装目录下的gitconfig  --system系统级

C:user李.gitconfig

配置用户名和邮箱 便于提交文件

git config --global user.name "SpaceJz"

git config --global user.email 7228292@qq.com

原文地址:https://www.cnblogs.com/jzspace/p/12967873.html