Fork me on GitHub

GitHub最新命令使用教程

一、创建github仓库并提交代码

1.在github创建public仓库

2.会生成一个git地址
https://github.com/ae6623/Zebra.git

3.在本地打开命令,在文件夹下敲入
git clone git地址

4.新建一个README.md的文本文件,然后编辑一下

5.就可以按照截图说的做了

git add README.md
git commit -m "first commit"
git remote add origin https://github.com/ae6623/Zebra.git
git push -u origin master
git remote add origin https://github.com/ae6623/Zebra.git
git push -u origin master

之后会弹出窗口,让你输入github的用户名密码,没问题,输入完毕,就提示git push 成功了。

二、使用Git命令,更新代码,进行版本迭代开发

  • git撤销commit提交
#查看git提交日志
git log 

#根据log获取到的ID,进行撤销
git reset --mixed id

#解决本地撤销commit造成的文件不同步
git checkout .

#查看状态
git status


欢迎fork 微服务框架 Spring boot web 中间件 Zebra
https://github.com/ae6623/Zebra

posted @ 2016-11-01 23:45  _落雨  阅读(422)  评论(0编辑  收藏  举报