注安装的前提条件是配置好git的相关环境或者安装好git.exe,此处不再重点提及

        上传的步骤:(本文采用git 命令界面进行操作)

        ( git config --global user.email "[email protected]"
           git config --global user.name "Your Name")实现登陆

        1.进入本地的项目目录,右键“Git Bash here”,调出git命令行界面,然后输入

[plain] view plain copy
  1. git init  

        2.就是将目录下的所有文件上传,也可以将“.”换成具体的文件名

[plain] view plain copy
  1. git add .  

           3.将项目提交到gitHub

[html] view plain copy
  1. git commit -m "注释语句"  
       

        4.在github上创建新的repository

       git命令行上传本地代码到github

           5.点击 “Create repository”跳转到一个连接,如下红色圈获取到本项目的github地址

                git命令行上传本地代码到github

6.将本地的代码关联到github上

[html] view plain copy
  1. git remote add origin 项目的github地址  


         7.如果是新建项目上传代码到github之前需要先pull

[plain] view plain copy
  1. git pull origin master  
     

         8.上传代码到远程仓库

[plain] view plain copy
  1. git push -u origin master  
           

        之后输入账号,密码,上传到github


参考文章:http://blog.csdn.net/hanhailong726188/article/details/46738929


相关文章:

  • 2021-10-08
  • 2021-08-20
  • 2021-05-18
  • 2022-01-07
  • 2022-01-07
  • 2022-01-06
  • 2021-11-26
猜你喜欢
  • 2021-11-02
  • 2021-09-21
  • 2021-09-21
  • 2020-04-13
  • 2021-08-22
  • 2021-04-30
  • 2021-06-18
相关资源
相似解决方案