git init初始化git仓库 git status查看git仓库状态 git add file添加追踪文件 git rm --cached file取消追踪文件 git commit -m "message"提交 git reset --soft HEAD~撤回最近的一次commit
git help [command]帮助 git log查看提交日志 git diff file查看未暂存文件相对于上一次提交的修改 git checkout file去除对当前文件所有操作,恢复到上一次提交的状态
git brancg列出所有分支 git branch branch-name添加新分支 git checkout branch-name切换分支 git branch -d branch-name删除分支 git checkout -b branch-name创建并切换至新分支 git merge other-branch将其他分支合并到当前分支
git remote查看远端仓库 git remote add origin url添加远端仓库 git push -u origin master推送到远端仓库 git pull拉取远端仓库提交
浅梦s 认证博客专家 推荐算法 深度学习 机器学习 浙大计算机硕士,现于阿里巴巴担任算法工程师。公众号:浅梦的学习笔记,Github:https://github.com/shenweichen