Skip to content

Commit 585cca5

Browse files
committed
增加git技巧
1 parent 49abfe0 commit 585cca5

File tree

4 files changed

+72
-39
lines changed

4 files changed

+72
-39
lines changed

.idea/workspace.xml

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## iPython基础
2+
**ipython**的核心功能是交互,您可以在`shell`中输入ipython notebook来进行开发和测试
3+
若想要`ipython notebook`同时使用`python2``python3`,可以使用如下命令
4+
```python
5+
ipython kernel install --name python2
6+
ipython kernel install --name python3
7+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## 基本技巧
2+
3+
### 保存状态
4+
5+
```git
6+
git init
7+
git add --all
8+
git commit -m 'my first snapshot'
9+
```
10+
上面的命令将会创建一个快照,将所做的更改保存下来。
11+
12+
### 添加,删除,重命名
13+
14+
```
15+
git add readme.txt
16+
git rm a.h b.c
17+
git rm -r a/b
18+
git mv a.h b.c
19+
```
20+
21+
### 撤销/重做
22+
23+
先使用`git log`来查看提交的历史,得到提交历史记录的哈希值
24+
![查看提交历史](/Users/ISAAC/project/blog/images/log.jpg)
25+
26+

images/log.jpg

266 KB
Loading

0 commit comments

Comments
 (0)