git常用语句

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38747509/article/details/82148992

开发前准备工作:
npm config set proxy http://172.31.1.246:8080            //为 npm 配置代理
npm config set registry https://registry.npm.taobao.org //改用淘宝镜像
npm i //拉取node_moudule下面的文件
npm run dev:static //静态页面开发环境


分支操作:
git branch -a //查看当前所在分支   (pc静态页面分支为feature-static)

git checkout feature-static //切换到feature-static分支

git checkout -b feature-static-yzp origin/feature-static //新建feature-static-yzp分支

提交操作:
git status //查看本地改动
git add .  //将本地所有改动添加到本地仓库
git commit -m 'test'  //将改动提交到本地仓库并写注释test
git push      //将本地仓库推送到分支feature-static-yzp
git checkout feature-static //切换feature-static
git pull       //更新feature-static分支内容
git merge feature-static-yzp //将feature-static-yzp分支内容合并到feature-static
git push //合并后的内容推送到feature-static分支上

猜你喜欢

转载自blog.csdn.net/weixin_38747509/article/details/82148992