ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

linux之git

2026/8/16 15:10:35 拓冰建站 浏览量
linux之git 1. 下载gitsudo apt install git2. 初始化仓库在要初始化的地方git init可能出的错 fatal: detected dubious ownership in repository at解决方法不是我写的解决Git报错fatal: detected dubious ownership in repository at-CSDN博客3. 暂存git add .4. 提交git commit -m “xxxxxxx”第一次提交可能遇到的错误 Please tell me who you are.解决方法不是我写的解决git上传提交的时出现Please tell me who you are.问题_*** please tell me who you are.-CSDN博客5. 连接远程仓库git remote add origin xxxxxxxxxx6. 拉取远程仓库git pull origin master6. 提交git push -u origin master6. 查看状态git status7. 差异对比git diff8. 查看版本信息git log简化查看git log --prettyonline9. 版本回退//回退到上一次git reset --hard HEAD^HEAD^^ 上两次最多12个版本10. 取消回退1) git reflog 查看HEAD前面的版本号2git reset --hard 版本号提交前要暂存按顺序