git 常用命令

git stash

https://git-scm.com/book/zh/v1/Git-%E5%B7%A5%E5%85%B7-%E5%82%A8%E8%97%8F%EF%BC%88Stashing%EF%BC%89
git stash list
git stash apply stash@{2}

git checkout

https://git-scm.com/book/zh/v1/Git-%E5%88%86%E6%94%AF-%E8%BF%9C%E7%A8%8B%E5%88%86%E6%94%AF

git branch

git checkout -b sf origin/dev-feature/customer
git branch -d origin/dev-feature/customer
git branch -a

git clone

git clone https://github.com/sferik/sign-in-with-twitter.git signin

git fork

Fork出的项目中更新主流代码方式:
通过命令行添加远程主流的分支:
git remote add upstream http://原始项目的git地址URL
通过:git remote -v
查看当前仓库所有的内部和外部分的流。再通过检出主流分支即可。其他的都一样
参考:https://www.jianshu.com/p/3053b25a50e2

https://blog.csdn.net/caogos/article/details/78261008

git 还原

git reset --hard HEAD --

git 用户名密码存储

git config --global credential.helper store

你可能感兴趣的:(git 常用命令)