>git status
//working tree clean
>git checkout -b login
//创建新分支
>git branch
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git status
On branch login
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: src/components/HelloWorld.vue
deleted: src/views/About.vue
deleted: src/views/Home.vue
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)(use "git restore <file>..." to discard changes in working directory)
modified: package.json
modified: src/App.vue
modified: src/main.js
modified: src/plugins/element.js
modified: src/router/index.js
modified: yarn.lock
Untracked files:
(use "git add <file>..." to include in what will be committed)
package-lock.json
src/assets/css/
src/components/
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>gitadd.
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/App.vue.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/plugins/element.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/router/index.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package-lock.json.
The file will have its original line endings in your working directory
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git status
On branch login
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: package-lock.json
modified: package.json
modified: src/App.vue
new file: src/assets/css/global.css
deleted: src/components/HelloWorld.vue
new file: src/components/Home.vue
new file: src/components/Login.vue
modified: src/main.js
modified: src/plugins/element.js
modified: src/router/index.js
deleted: src/views/About.vue
deleted: src/views/Home.vue
modified: yarn.lock
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git commit -m "登录完成"[login ef3bcd6] 登录完成
13 files changed, 12555 insertions(+), 151 deletions(-)
create mode 100644 package-lock.json
rewrite src/App.vue (84%)
create mode 100644 src/assets/css/global.css
delete mode 100644 src/components/HelloWorld.vue
create mode 100644 src/components/Home.vue
create mode 100644 src/components/Login.vue
rewrite src/router/index.js (60%)
delete mode 100644 src/views/About.vue
delete mode 100644 src/views/Home.vue
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git branch
* login
master
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git branch
login
* master
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git merge login
Updating c7cd4f0..ef3bcd6
Fast-forward
package-lock.json |12245 ++++++++++++++++++++++++++++++++++++++++
package.json |3 +
src/App.vue |27 +-
src/assets/css/global.css |5 +
src/components/HelloWorld.vue |59 -
src/components/Home.vue |20 +
src/components/Login.vue |132 +
src/main.js |5 +
src/plugins/element.js |6 +-
src/router/index.js |29 +-
src/views/About.vue |5 -
src/views/Home.vue |18 -
yarn.lock |92 +-
13 files changed, 12525 insertions(+), 121 deletions(-)
create mode 100644 package-lock.json
create mode 100644 src/assets/css/global.css
delete mode 100644 src/components/HelloWorld.vue
create mode 100644 src/components/Home.vue
create mode 100644 src/components/Login.vue
delete mode 100644 src/views/About.vue
delete mode 100644 src/views/Home.vue
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git push
Enumerating objects: 30, done.
Counting objects: 100% (30/30), done.
Delta compression using up to 8 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (18/18), 124.95 KiB |6.58 MiB/s, done.
Total 18(delta 3), reused 0(delta 0)
remote: Powered by GITEE.COM [GNK-6.1]
To https://gitee.com/nmsl-6324/vue_shop.git
c7cd4f0..ef3bcd6 master -> master
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git checkout login
Switched to branch 'login'
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git branch
* login
master
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>git push -u origin login
Total 0(delta 0), reused 0(delta 0)
remote: Powered by GITEE.COM [GNK-6.1]
remote: Create a pull request for'login' on Gitee by visiting:
remote: https://gitee.com/nmsl-6324/vue_shop/pull/new/nmsl-6324:login...nmsl-6324:master
To https://gitee.com/nmsl-6324/vue_shop.git
* [new branch] login -> login
Branch 'login'set up to track remote branch 'login' from 'origin'.
PS D:\1f\1s\vuestudy\黑马程序员vueshop\vue_shop>