github代码提交初始化方式

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

 *    详细介绍

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

* 详细介绍

解决方案

  • 维持单个文件在100M以内,保持原仓库,剔除单个文件大于100M的 
    • github 官方解决方案
    • 网上他人解决方案1:http://www.jianshu.com/p/09a2d9db861c
    • 网上他人解决方案2:http://www.codeinterpreter.com/2015/01/solving-this-exceeds-githubs-file-size.html
    • 网上他人解决方案3 :http://jingpin.jikexueyuan.com/article/36116.html 

…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.

回复到历史版本

  • https://blog.csdn.net/sinat_26367835/article/details/45047411
  • https://blog.csdn.net/yxys01/article/details/78454315?locationnum=10&fps=1
1、 查找历史版本

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

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

2、 恢复到历史版本

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

$ git push -f -u origin master  




你可能感兴趣的:(code)