项目文件托管到 码云

版权声明:未经同意,不得随意转载转载 https://blog.csdn.net/lucky541788/article/details/83445135

关于 git 的入门使用,参见:git 新手入门
关于 git 原理,参见:阮一峰 git 原理

1.项目根目录下新建 .gitignore

配置下面属性(就是上传时要忽略的文件夹,减小上传体积)

.idea 是指使用编辑器(如 webstorm 等)的默认配置文件

node_modules
.idea
.vscode
.git

2.项目根目录下新建 README.md

是用来告诉项目相关信息的,如下面的相关信息
## [主流开源协议之间有何异同?](https://www.zhihu.com/question/19568896)

## 用(传统方式)命令行把修改过后的代码上传到码云???
1. git add .
2. git commit -m "提交信息"
3. git push

## 制作首页App组件
1. 完成 Header 区域,使用的是 Mint-UI 中的Header组件
2. 制作底部的 Tabbar 区域,使用的是 MUI 的 Tabbar.html
 + 在制作 购物车 小图标的时候,操作会相对多一些:
 + 先把 扩展图标的 css 样式,拷贝到 项目中
 + 拷贝 扩展字体库 ttf 文件,到项目中
 + 为 购物车 小图标 ,添加 如下样式 `mui-icon mui-icon-extra mui-icon-extra-cart`
3. 要在 中间区域放置一个 router-view 来展示路由匹配到的组件

## 改造 tabbar 为 router-link

## 设置路由高亮

## 点击 tabbar 中的路由链接,展示对应的路由组件

## 制作首页轮播图布局

## 加载首页轮播图数据
1. 获取数据, 如何获取呢, 使用 vue-resource
2. 使用 vue-resource 的 this.$http.get 获取数据
3. 获取到的数据,要保存到 data 身上
4. 使用 v-for 循环渲染 每个 item 项

## 改造 九宫格 区域的样式

在这里插入图片描述

3.项目根目录下引入开源协议 LICENSE

主流开源协议之间有何异同?

The MIT License (MIT)

Copyright (c) 2014 connors and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

4.初始化

命令:git init

使用:git status可以查看未提交文件
在这里插入图片描述

5.提交文件

命令:git add .
在这里插入图片描述
命令:git commit -m "init my project"
在这里插入图片描述
至此提交本地的 git 完毕
在这里插入图片描述

5.上传到码云的步骤

具体上传过程,在新建完可以看见

  1. 建空库:

在这里插入图片描述

  1. 如果没有绑定过自己的 pc

git config --global user.name "name"
git config --global user.email "email"
  1. 上传

绑定:git remote add origin [email protected]:shanyiting/mayun.git
上传:git push -u origin master

在这里插入图片描述
至此上传成功

6.项目文件修改上传码云

一、用(传统方式)命令行把修改过后的代码上传到码云

  1. git add .
  2. git commit -m "提交信息"
  3. git push

二、visual studio code 自带的提交(由于我是 webstorm,无奈)

7.文件的删除

  1. 如果服务器和码云上面的内容不一致,先用git pull origin master
  2. git rm -r --cached filename // 删除的文件
  3. git commit -m "delete filename"
  4. git push origin master // 推送到码云

猜你喜欢

转载自blog.csdn.net/lucky541788/article/details/83445135