Skip to content

Instantly share code, notes, and snippets.

@ohcrfpv
Last active December 4, 2018 02:13
Show Gist options
  • Save ohcrfpv/4aad3360e305333456e139725bb8fefe to your computer and use it in GitHub Desktop.
Save ohcrfpv/4aad3360e305333456e139725bb8fefe to your computer and use it in GitHub Desktop.
git基本用法

git clone [email protected]:fewspider/client-1.git 克隆一个项目到本地,默认路径是git项目的地址

git status 查看当前分支的状态

git add . 添加当前的修改

git commit -m 'update' 记录一个修改

git push origin master 提交当前所有修改到远程master分支

git checkout -b dev 新建一个dev分支,随后切换到dev分支

git checkout dev 切换到已经存在的dev分支

git init 初始化当前路径git

git remote add origin [email protected]:fewspider/client-1.git 添加当前路径git远程地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment