webstorm 中 git 基本操作
一、 基本设置 在安装完 Git 之后,需要运行以下两句命令 git config [--global] user.name "John Doe" git config [--global] user.email johndoe@example.com 如果不想每次 pull|push 操作都输入用户名、密码则添加以下设置 git config [--global] credential.helper store 二、 本地库(仓库)[init|clone] 新建仓库: 创建一个目录,在目录中执行 git init 克隆仓库: git clone <remote|local> [pathname] remote: 远程库地址 local: 本地库地址 pathname: 检出路径(默认为当前目录) 三、 文件[add|commit] 文件状态: Untracked: 未跟踪 Unmodified: 未修改 Modified: 已修改 Staged: 已暂存 将未跟踪(Untracked)或已修改文件(Modified)放入暂存区(Staged): git add <.|pathname>... .: 所有文件 pathanme: 文件路径 将暂存区(Staged)的文件保存(未修改状态:Unmodified) git commit <-m message> -m message: