Git

Git使用方法

工具

    1. Git
    2. 预提交项目
    3. GitHub账户

      步骤/方法

    4. 打开预提交项目文件夹,修改.gitignore文件,从https://github.com/github/gitignore
      中选取需要提交的项目类型的gitignore。比如你需要提交Android项目,需要点击Android.gitignore
      文件,把内容覆盖到本地的.gitignore文件中。
    5. 创建README.md文件,写项目简介。
    6. 打开预提交项目文件夹,随便找个空白地方,右键,选择 Git Bash Here。
    7. 在命令行界面中输入git init
    8. 出现“Initialized empty Git repository in 路径”字段后输入git add ./(add与“.”之间必须有空格)
    9. 输入git commit(报错的一堆warning不用管)
    10. 按"i"键写项目日志
    11. 按Esc后按":"再输入wq(保存配置)
    12. 打开GitHub官网点击右上角加号选择New Repository,只填写Repository name然后点击Create Respository
    13. 找到…or push an existing repository from the command line栏,复制第一行代码
      git remote add origin https://github.com/IzayoiShiro/MySQLite.git,在http://后添加用户名+:+密码+@
      然后在命令行输入git remote add origin https://11111:222222@github.com/IzayoiShiro/MySQLite.git
    14. 输入git push -u origin master

原文地址:https://www.cnblogs.com/tangwanzun/p/5669627.html