最近两次提交:git log -2

单行显示:git log --pretty=oneline

退出git log:Q

查看状态:git status

stage文件:git add <file>

提交:git commit -m "msgxxxxx"

忽略修改:git checkout --<file>

推送到仓库:git push

回退到最近一次commit:git reset --hard

清除没被track的文件:git clean -f

记住用户名密码:在git bash输入 git config --global credencial.helper store

修改密码:git config --global user.password "your password"

查看用户名:git config --global user.name

查看本地分支:git branch

查看远程分支:git branch -r

切换分支:git checkout <name>

posted on 2017-03-15 14:52  蛋尼  阅读(497)  评论(0)    收藏  举报