git reset --hard 初始化 -- 强制回退
初始化
git init -- 初始化一个git仓库
git add . -- 将当前仓库所有代码都加载到git暂管区
git commit -m '备注' -- 提交代码到本地git
----------到github上创建仓库(https)----------
git remote add origin https://github.com/... -- 将代码添加到源
git pull --rebase origin master -- (可选)将远程库与本地同步合并
git push -u origin master -- 将代码推送到源
基于commitid拉取代码
git checkout -b new_branch_name history_commit_id
本文提供了Git的基础操作指南,包括仓库初始化、代码提交、远程仓库同步及代码回退等核心命令,适合初学者快速掌握Git的基本使用。
2443

被折叠的 条评论
为什么被折叠?



