Skip to content

Commit c22fec7

Browse files
committed
readme
1 parent 03dbc52 commit c22fec7

File tree

1 file changed

+1
-62
lines changed

1 file changed

+1
-62
lines changed

README.md

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1 @@
1-
## 代码提交流程
2-
3-
### 我们用fetch + rebase的方式同步代码
4-
5-
6-
### 步骤
7-
8-
1. 将项目fork到自己的名下
9-
10-
2. 添加项目的源仓库, 并查看是否添加成功
11-
```
12-
git remote add origin http://git.jc/你的用户名/项目名称.git
13-
git remote add upstream http://git.jc/项目组/项目名称.git
14-
git remote -v
15-
```
16-
17-
3. 设置个人信息,
18-
```
19-
git config --global user.name "你的名字"
20-
git config --global user.email "你的邮箱"
21-
```
22-
4. 新建特性分支
23-
```
24-
git checkout -b feature-版本号-特性分支名字/自己的名字
25-
便于后续快速查找对应的分支
26-
举例
27-
// git checkout -b feature-v0.1-init
28-
```
29-
30-
5. 本地开发完成**第一个**功能(或创建了需要的文件) 把本地分支推送到自己远程的特性分支(后续开发需要 fetch/rebase)
31-
```
32-
举例
33-
git push origin feature-v0.1-init
34-
```
35-
6. 进入到 gitlab 项目仓库,点击 Merge Request , 然后点击 New Merge Request , 从 Source branch 选择自己名下正在开发的分支, 从 Target branch 选择想要合并的分支(通常为 develop),点击 Compare branches and continue, 确认无误后点击提交
36-
7. 后续开发要经常从 develop 分支获取最新代码, 合并到本地
37-
```
38-
git fetch upstream develop
39-
git rebase upstream/develop
40-
```
41-
8. 合并过程中如果遇到冲突,先解决冲突,然后
42-
```
43-
git add . (git add .,不要commit)
44-
git rebase --continue
45-
```
46-
重复步骤5,直到解决全部冲突
47-
48-
9. 将没有冲突的代码 push 到自己远程特性分支
49-
```
50-
举例
51-
git push origin feature-v0.1-init
52-
```
53-
## 引用常用资源
54-
55-
现在在webpack配置了alias方便引用资源,举个例子当你在某个视图组件中需要引用公共组件;不管你与那个组件的相对路径是怎样的,可以直接`import AddButton from 'Components/AddButton'`
56-
目前可以这样引用的有:
57-
58-
- Src: 对应src目录
59-
- Util: 对应'src/utils/'
60-
- Components: 对应'src/components/',
61-
- Assets: 对应'src/assets/',
62-
- Constant: 对应'src/constant/'
1+
# 微前端 Base App Demo

0 commit comments

Comments
 (0)