github代码提交初始化方式

### 有关github的详解介绍可以查看这里

 *    详细介绍

### 上传超过100M的文件使用

* 详细介绍

解决方案

…or create a new repository on the command line

 echo "# resource" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:nmww/resource.git
git push -u origin master

…or push an existing repository from the command line

 git remote add origin [email protected]:nmww/resource.git
git push -u origin master

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

回复到历史版本

1、 查找历史版本

       使用git log命令查看所有的历史版本,获取你git的某个历史版本的id
       $ git log --pretty=oneline

       假设查到历史版本的id是fae6966548e3ae76cfa7f38a461c438cf75ba965。

2、 恢复到历史版本

$ git reset --hard fae6966548e3ae76cfa7f38a461c438cf75ba965
1
3、 把修改推到远程服务器

$ git push -f -u origin master  




猜你喜欢

转载自blog.csdn.net/flyingsir_zw/article/details/80115436