zl程序教程

您现在的位置是:首页 >  工具

当前栏目

GitHub 创建仓库和提交项目

GitHub项目 创建 提交 仓库
2023-09-11 14:19:28 时间

  一 1、注册用户。 打开 https://github.com/ , 点Sign up 注册即可。

  2、创建项目

  GitHub 创建仓库和提交项目_GitHub 创建仓库和提交项目

  GitHub 创建仓库和提交项目_GitHub 创建仓库和提交项目_02

  3、提交项目代码

  cd zhihu // 在本地命令行中切换到自己的项目中

  git init // 初始化仓库

  git add . // 把所有文件提交到暂存区

  git commit -m ‘init’ // 提交到本地仓库

  git remote add origin https://github.com/zhouchangy/zhihu.git // 和远程仓库建立连接,把地址换成自己的

  git push -u origin master // 推送到远程仓库

  二:前端解决跨域问题

  三:Axios

  Axios是一个基于promise的HTTP库,可以用在浏览器和node.js中。

  安装步骤:

  1)$npm install axios

  2) $bower install axios

  使用cdn: