查看“项目开发代码提交(Chapter 4)”的源代码
←
项目开发代码提交(Chapter 4)
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
==创建分支== ===查看当前分支=== <nowiki>thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v1.0) $ git status On branch mmall_v1.0 Untracked files: (use "git add <file>..." to include in what will be committed) package-lock.json package.json src/ webpack.config.js</nowiki> ===创建并切换分支=== <nowiki>thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.0) $ git checkout -b mmall_v4.11 Switched to a new branch 'mmall_v4.11' thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.11) $ git branch master mmall_v1.0 mmall_v4.0 * mmall_v4.11</nowiki> ==提交分支到远程== ===查看分支状态=== $ git status <nowiki>On branch mmall_v4.11 Untracked files: (use "git add <file>..." to include in what will be committed) package-lock.json package.json src/ webpack.config.js nothing added to commit but untracked files present (use "git add" to track)</nowiki> ===将改动提交给本地代码库 === <nowiki>thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.11) $ git add . warning: LF will be replaced by CRLF in package-lock.json. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in package.json. The file will have its original line endings in your working directory. thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.11) $ git commit -am "chapter 4" [mmall_v4.11 fd4ea47] chapter 4 32 files changed, 5915 insertions(+) create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/image/icon/loading.gif ...</nowiki> git commit 主要是将暂存区里的改动给提交到本地的版本库。 -m 参数表示可以直接输入后面的“message” -a参数可以将所有已跟踪文件中的执行修改或删除操作的文件都提交到本地仓库,即使它们没有经过git add添加到暂存区. ===将代码提交到远程=== <nowiki>thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.11) $ git push fatal: The current branch mmall_v4.11 has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin mmall_v4.11 thinkpad@DESKTOP-LN2H42N MINGW64 ~/mmall - v4.11/doc/mmall-fe (mmall_v4.11) $ git push --set-upstream origin mmall_v4.11 Counting objects: 50, done. Delta compression using up to 4 threads. Compressing objects: 100% (42/42), done. Writing objects: 100% (50/50), 73.68 KiB | 1.05 MiB/s, done. Total 50 (delta 1), reused 0 (delta 0) remote: Powered By Gitee.com To gitee.com:happymmall_shangzhi/mmall_fe.git * [new branch] mmall_v4.11 -> mmall_v4.11 Branch mmall_v4.11 set up to track remote branch mmall_v4.11 from origin.</nowiki> ==查看分支提交情况== 在码云上查看分支提交情况: [[文件:web9-9.png]]
返回至
项目开发代码提交(Chapter 4)
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息