forked from lyhue1991/eat_pytorch_in_20_days
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push-to-github.py
92 lines (48 loc) · 1.42 KB
/
push-to-github.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# -*- coding: utf-8 -*-
# ## 推送主分支
# !git config --global user.email "[email protected]"
# 出现一些类似 warning: LF will be replaced by CRLF in <file-name>. 可启用如下设置。
# !git config --global core.autocrlf false
# 配置打印历史commit的快捷命令
# !git config --global alias.lg "log --oneline --graph --all"
# !git init
# !git add ./data/* *.md *.py
# +
# #!rm -rf *.html
# -
# !git rm --cached .ipynb_checkpoints/*
# !git commit -m "revise 6-3"
# !git remote add origin https://github.com/lyhue1991/eat_pytorch_in_20_days
# !git pull origin master
# !git push origin master
# !git remote rm gitee
# !git remote add gitee https://gitee.com/Python_Ai_Road/eat_pytorch_in_20_days
# !git push -f gitee master
# ## 创建pages分支
# !git checkout -b gh-pages
# !git rm --cached -r *.md
# !git clean -df
# !rm -rf *.md
# !cp -r _book/* .
# !git add .
# !git reset
# !git pull origin gh-pages
# !git commit -m 'add gh-pages'
# !git push -u origin gh-pages
# !git checkout pages
# ## 更新命令
# !git checkout master
# !git add ./data/* *.md *.py
# !git commit -m "revise readme"
# !git push -u origin master
# !gitbook build
# !git branch -D gh-pages
# !git checkout -b gh-pages
# !git rm --cached -r *.md
# !git clean -df
# !rm -rf *.md
# !cp -r _book/* .
# !git add .
# !git commit -m "add postscript"
# !git push -f origin gh-pages
# !git checkout master