Skip to content

Commit

Permalink
udate img
Browse files Browse the repository at this point in the history
  • Loading branch information
smyhvae committed Oct 2, 2018
1 parent 7ce844c commit b620f31
Show file tree
Hide file tree
Showing 53 changed files with 1,655 additions and 2,222 deletions.
35 changes: 23 additions & 12 deletions 00-前端工具/01-Git的使用.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ git branch -d feature_item_recommend
### 合并分支时,如果存在分叉


20180610_1650.png
![](http://img.smyhvae.com/20180610_1650.png)


比如说上面这张图中,最早的时候,master分支是位于`C2`节点。我基于`C2`节点,new出一个新的分支`iss53`,我在`iss53`上提交了好几个commit。

Expand All @@ -97,11 +98,11 @@ Git 没有简单地把分支指针右移,而是对三方合并的结果作一

值得一提的是Git 可以自己裁决哪个共同祖先才是最佳合并基础;这和CVS 或Subversion(1.5 以后的版本)不同,它们需要开发者手工指定合并基础。所以此特性让Git 的合并操作比其他系统都要简单不少。

20180610_1710.png
![](http://img.smyhvae.com/20180610_1710.png)

### 解决合并时发生的冲突

20180610_1740.png
![](http://img.smyhvae.com/20180610_1740.png)

如果 feature1和feature2修改的是同一个文件中**代码的同一个位置**,那么,把feature1合并到feature2时,就会产生冲突。这个冲突需要人工解决。步骤如下:

Expand All @@ -124,14 +125,27 @@ git自动合并成功。不管是git自动合并成功,还是在人工解决
## 日常操作积累


### 修改已经commit的备注信息
### 修改密码(曲线救国)


> 网上查了很久,没找到答案。最终,在cld童鞋的提示下,采取如下方式进行曲线救国。
```bash
# 设置当前仓库的用户名为空
git config user.name ""
```


然后,当我们再输入`git pull`等命令行时,就会被要求重新输入*新的*账号密码。此时,密码就可以修改成功了。最后,我们还要输入如下命令,还原当前仓库的用户名:

```
git config user.name "smyhvae"
```


### 修改已经push的某次commit的作者信息

已经push的记录,如果要修改作者信息的话,只能 通过--force命令。
已经push的记录,如果要修改作者信息的话,只能 通过--force命令。我反正是查了很久,但最终还是不敢用公司的仓库尝试。

参考链接:

Expand All @@ -144,8 +158,6 @@ git自动合并成功。不管是git自动合并成功,还是在人工解决





### `branch1`的某个`commit1`合并到`branch2`当中

切换到branch2中,然后执行如下命令:
Expand All @@ -159,16 +171,15 @@ git cherry-pick commit1

20180623时,网上看了下Git客户端的推荐排名:

20180623_1210.png
![](http://img.smyhvae.com/20180623_1210.png)

上面的Git客户端我基本都用过了,我最推荐的一款Git客户端是:**Tower**

### SmartGit
**SmartGit**

商业用途收费, 个人用户免费:

20180623_1305.png


![](http://img.smyhvae.com/20180623_1305.png)



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@



## 前言

VS Code 的全称是 Visual Studio Code,是微软推出的一款免费的、开源的跨平台编辑器。





## 常用快捷键


### 编辑


**删除文字**


| 快捷键 | 作用 | 备注 |
|:-------------|:-----|:-----|
|delete|删除光标的前一个字符|相当于 Windows 键盘上的退格键|
|fn + delete|删除光标的后一个字符||
|**option + delete**|删除光标之前的一个单词|英文有效|
|**command + delete**|删除光标之前的整行内容|【荐】|

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@


## 常见操作

### 自动保存
## 常见配置


**自动保存**

```
"files.autoSave": "onFocusChange"
Expand All @@ -12,6 +14,16 @@



**在新的窗口中打开文件**

```json
"workbench.editor.enablePreview": false,
```


## 常见操作



### 如何查看代码结构

Expand All @@ -23,12 +35,6 @@



### 在新的窗口中打开文件

```json
"workbench.editor.enablePreview": false,
```

### 在本地开启服务器

```bash
Expand Down Expand Up @@ -140,15 +146,17 @@ Sass 文件格式化。

在本地开启Node服务器:

20180611_2230.png
![](http://img.smyhvae.com/20180611_2230.png)

然后在浏览器的地址栏输入`http://localhost/` + 文件的相对路径,就可以通过服务器的形式打开这个文件。

### Copy Relative Path

> 这个插件很有用,使用频率很高。
复制文件的相对路径:(相对于根路径而言)

20180611_2235.png
![](http://img.smyhvae.com/20180611_2235.png)


### open in browser
Expand Down Expand Up @@ -238,10 +246,6 @@ VSCode自带的高亮显示,实在是不够显眼。用插件支持一下吧



### 代码格式化



### 如何同时打开多个窗口


Expand Down Expand Up @@ -271,7 +275,7 @@ VSCode自带的高亮显示,实在是不够显眼。用插件支持一下吧

### 某网友的VS Code 插件截图

20180611_2255.png
![](http://img.smyhvae.com/20180611_2255.png)



Expand Down
23 changes: 23 additions & 0 deletions 00-前端工具/whistle网络抓包.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ whistle安装证书后,可以拦截 https 请求。但是,我现在又不想



## 移动端调试神器:eruda


> 手机连接代理时,如何看console.log的日志信息?
> 现在,代码里有console.log,如果是在电脑浏览器上看,可以直接在控制台查看console.log的内容。但是,如果手机连接代理,在手机上打开网页的话,要怎么查看console.log的内容呢?具体做法如下:
(1)在 whistle中,新建一个名叫`Eruda H5`的代理,代理中的内容是:

```
http://xxx.com htmlAppend://{eruda.html}
```


(2)新建一个values,里面的内容是:

```html
<script src="//cdn.bootcss.com/eruda/1.4.3/eruda.min.js"></script>
<script>
eruda.init()
</script>
```


然后就OK了。

70 changes: 0 additions & 70 deletions 00-前端工具/推荐链接.md

This file was deleted.

Loading

0 comments on commit b620f31

Please sign in to comment.