提交学习笔记专用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
1.0 KiB

git:免费开源的分布式管理系统 使用仓库的数据库来记录文件的变化。
一、理解了git工作区域:
工作区:你在本地编辑器里改动的代码,所见即所得,里面的内容都是最新的
暂存区:通过 git add 指令,会将你工作区改动的代码提交到暂存区里
本地仓库:通过 git commit 指令,会将暂存区变动的代码提交到本地仓库中,本地仓库位于你的电脑上
远程仓库:远端用来托管代码的仓库,通过 git push 指令,会将本地仓库的代码推送到远程仓库中
二:安装git 去官网下载 然后控制台:git -v 可看到版本号,安装成功。
官网下载安装git客户端管理工具SourceTree
三、熟悉git常见命令
# 配置用户名
git config --global user.name "yourname"
# 配置用户邮箱
git config --global user.email "youremail@xxx.com"
# 查看当前的配置信息
git config --global --list
# 通过 alias 配置简写
## 例如使用 git co 代替 git checkout
git config --global alias.co checkout