1、git init 初始化本地库 2、git status 查看本地库状态 3、git add fileName 提交工作区修改到暂存区 4、git commit -m “commit messge” fileName 提交暂存区内容到本地库 (MERGING状态不加文件名) 5、git add +git commit =git commit -a
6、git remote -v 查看别名 7、git remote add NickName RemoteAddress 给远程库起别名
8、git branch -v 9、git branch BranchName 10、git checkout BranchName
11、git merge BranchName/1 12、git merge --abort
13、git log [–pretty=oneline] [ --oneline] 14、git reflog
15、git reset [–hard] [–mixed] [–soft] HashIndex 16、git reset [–hard] [–mixed] [–soft] HEAD^ 17、git reset [–hard] [–mixed] [–soft] HEAD~n
18、git rm --cache FileName 19、rm FileName 20、rm -r .ssh
21、git diff 不加文件名比较当前工作区的所有文件 22、git diff FileName 工作区文件和暂存区比较 23、git diff HashIndex FileName 工作区文件和本地库历史记录作比较
