下载地址: https://git-scm.com/download
鼠标右键打开Git Bash
git config --global user.name “***”
git config --global user.email “***”
git config --global user.name
git config --global user.email
有些常用的指令参数非常多,每次都要输入好多参数,我们可以使用别名。
#用于输出git提交日志 alias git-log='git log --pretty=oneline --all --graph --abbrev-commit'
#用于输出当前目录所有文件及基本信息
alias ll='ls -al'
1.打开GitBash执行下面命令
git config --global core.quotepath false
2.在.bashrc 文件文件最后加入下面两行
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
要使用Git对我们的代码进行版本控制,首先需要获得本地仓库
1.在电脑的任意位置创建一个空目录(例如test)作为我们的本地Git仓库
2进入这个目录中,点击右键打开Git bash窗口
3.执行命令git init
4.如果创建成功后可在文件夹下看到隐藏的.git目录
