首页 > 技术文章 > git gitbash 常用 命令

shaoing 2017-06-08 18:18 原文

 

git add
git commit
git checkout master
git merge dev
git status
git pull
git push origin master
git checkout dev
git merge master
------------
git reflog
git reset --hard acaa93e

 

删除一些没有git add的文件
git clean 参数
    -n 显示 将要 删除的 文件 和  目录
     -f 删除 文件,-df 删除 文件 和 目录
---------------
查看 git 配置
$ git config -l

 

一种是 git rm --cached "文件路径",不删除物理文件,仅将该文件从缓存中删除;
一种是 git rm --f "文件路径",不仅将该文件从缓存中删除,还会将物理文件删除(不会回收到垃圾桶)。

 

推荐阅读