git clone <repository_path> #克隆一个远程仓库
git init #将文件夹初始化为仓库(生成一个.git文件)
git add <File_path> #将指定文件Stage(标记为将要被提交)
git reset <File_path> #将指定文件Unstage(取消标记)
git commit -m "Your commit information." #创建一个提交,提供提交信息
git checkout #回滚
git checkout HEAD^n #往上回滚n次提交
git push #向远程仓库推送
git pull #从远程仓库拉取
git log #显示提交日记
git checkout -b <branchname> #从当前节点新建分支
git branch #列举所有的分支
git checkout <branchname> #单纯地切换到某个分支
git branch -D <branchname> #删除特定的分支
git merge <branchname> #合并分支
git metge --abort #暂时放弃合并(遇到合并冲突时)
Github官方提供的给新仓库传入文件的方式: