git基本使用操作

正常操作

1. git status	(先查看仓库状态

2. git add .	(把所有的修改提交,点之前有个空格
	or 
	git add xxx	(只提交某一部分修改

3. git commit -m "提交日志"	(提交到本地缓存

4. git pull origin master 	(拉取远程主机master分支的更新与本地合并

5. git push origin master		(将本地提交推送到远程仓库

强制操作

1. 本地强制回退到指定的版本,需要在本地仓库文件夹中打开Git Bash Here命令窗口
	git reset --hard  b6624e979e2c192e5cbf62cb2cfce43c4c736186

2. 强制提交至远程仓库master分支下
	git push -f origin master

猜你喜欢

转载自blog.csdn.net/weixin_45121502/article/details/105364713