GIT 常用命令

git reset --hard ____ 进入————状态

git log / git reflog 查看状态

git status 查看 git diff

git commit -m 添加描述(git 库):新建一个index.txt文件

git commit -a -m 添加

git add * 添加到缓存区

rm 文件名 删除

git reset HEAD index.txt 仓库返回到缓存区

git checkout -- index.txt 缓存区到工作区

........................

文件上传(1):
将文件夹clone到桌面 git init - 添加文件 - git add * - git commit -m - git branch 查看分支 -
git push origin master上传文件


文件上传(2):
git remote add origin https:
git pull origin master
git push -u origin master


git branch 查看分支 git checkout 分支 切换分支

git merge 分支 合并分支

原文地址:https://www.cnblogs.com/-khj/p/6148202.html