# supermall **Repository Path**: dsccool/supermall ## Basic Information - **Project Name**: supermall - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-02-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # supermall安装和运行编译 npm install npm run serve npm run build #git常用命令 [如果是刚刚安装的git,再webstorm中无法识别的命令,那么需要重启电脑才能再webstorm中生效] 1.下载项目代码 git clone git地址 2.代码状态查看 git status 3.添加当前目录下所有代码到本地git仓库 git add . 4.提交代码到本地仓库 git commit -m '提交代码说明文字' 5.push代码到远程仓库 git push ##本地代码与远程仓库 git config --global user.email '317291531@qq.com' git config --global user.name 'dusuichao' (一) 1.从远程仓库down下初始空项目 2.将本地写的代码copy到初始项目中 git文件夹不copy 3.执行git add 、commit、push等等相关命令 (二) 1.本地建项目、gitee上建项目,然后将两者关联起来 2.执行如下两个命令: git init git remote add origin git远程地址 git push -u origin master ##其他git常用命令: git init //初始化本地git环境 git clone XXX//克隆一份代码到本地仓库 git pull //把远程库的代码更新到工作台 git add . //把本地的修改加到暂存区中 git commit -m 'comments here' //把暂存区中的修改提交到本地库 git push //把本地库的修改提交到远程库中 git branch -r/-a //查看远程分支/全部分支 git checkout master/branch //切换到某个分支 git checkout -b test //新建test分支 git checkout -d test //删除test分支 git merge master //假设当前在test分支上面,把master分支上的修改同步到test分支上 git status //查看当前分支有哪些修改 git log //查看当前分支上面的日志信息 git branch: 列出本地所有分支,当前分支会被星号标示出 git branch (branchname): 创建一个新的分支(当你用这种方式创建分支的时候,分支是基于你的上一次提交建立的). git branch -d (branchname): 删除一个分支. git branch -a:列出所有分支,包含本地与远程,当前分支会被星号标识出 git status 查看改动的代码 git remote -v:可以看见每一个别名对应的实际url. git remote add [alias] [url]: 添加一个新的remote repo git remote rm [alias]: 删除一个存在的remote alias. git remote rename [old-alias] [new-alias]: 重命名. git checkout [name]:切换分支 git checkout -b [name]:创建分支,并切换到该分支 ##问题: fatal: remote origin already exists: 先删除再提交: git remote rm origin ##本地项目与远程仓库关联【远程仓库要是空的,不要有任何文件】 mkdir testvue cd testvue git init touch README.md git add README.md git commit -m "first commit" git remote add origin https://gitee.com/dsccool/testvue.git git push -u origin master ###本地创建一个分支,并提交到远程同时远程生成对应的分支 git push --set-upstream origin 分支名称 ###合并分支到当前master,解决冲突再ide中更容易点