查看日志
git log 查看详细日志
git reflog 查看日志
版本回退
git reset --hard '版本号'
创建分支
git branch ‘分支名’
查看分支
git branch -v
切换分支
git checkout ‘分支名’
分支合并(先切到主分支在合并)master test
git merge ‘分支名’
查看别名
git remote -v
创建别名
git remote add ‘别名’ ‘链接地址’
拉取代码
git pull ‘别名’ ‘分支名称’
提交代码
git push ‘别名’ ‘分支名称’
克隆代码
git clone ‘地址’
git常用命令
最新推荐文章于 2024-07-08 22:55:03 发布