Skip to content

Commit d38b2d6

Browse files
committed
feat: auto upload
1 parent b0cbaa5 commit d38b2d6

File tree

3 files changed

+62
-8
lines changed

3 files changed

+62
-8
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
用命令行给本仓库提交代码步骤:
1+
## ⭐仓库提交代码步骤:
2+
23
0. 选择本地电脑上一个文件夹,克隆仓库内容到文件夹中
34

4-
```bash
5-
# 本处使用 ssh 协议,如未配置,需要先配置本地密钥到GitHub
6-
# 参考链接:https://blog.csdn.net/W_317/article/details/106518894
7-
$ git clone [email protected]:WL2O2O/JavaU8G.git
8-
```
5+
```bash
6+
# 本处使用 ssh 协议,如未配置,需要先配置本地密钥到GitHub
7+
# 参考链接:https://blog.csdn.net/W_317/article/details/106518894
8+
$ git clone [email protected]:WL2O2O/JavaU8G.git
9+
```
910

1011
1. 更改已有的文件内容或者新增文件
1112

@@ -33,10 +34,23 @@
3334

3435

3536

37+
## ⭐便捷脚本:
38+
39+
本仓库根目录中提供了一键 pull 和一键 upload 的脚本,因为多人协作为了便捷未设多分支结构进行管理,所以为了以防忘记拉取远仓最新代码,可以使用脚本文件进行点击式操作。
40+
41+
使用前提:需要简单更改两个脚本文件中的路径即可
42+
43+
![修改提示](https://cs-wlei224.obs.cn-south-1.myhuaweicloud.com/blog-imgs/202312110057907.png)
44+
45+
使用步骤:
46+
47+
1. 双击`autoPull.bat`
48+
2. 修改或者新增文件
49+
3. 双击`autoUpload.bat`
50+
3651

3752

38-
> ⭐⭐⭐注意事项:
39-
>
53+
## ⭐注意事项:
4054

4155
Q:为什么我提交代码出现了 reject 被拒绝?
4256

autoPull.bat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
3+
D:
4+
5+
cd D:\JavaU8G
6+
7+
echo "Pull the latest code from github..."
8+
9+
git pull origin master
10+
11+
echo "pull latest code over!"
12+
13+
timeout /t 3

autoUpload.bat

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
D:
4+
5+
cd D:\JavaU8G
6+
7+
echo "trucking files"
8+
9+
git add .
10+
11+
echo "trucking files over"
12+
13+
echo "commit files"
14+
15+
git commit -m "feat: auto upload"
16+
17+
echo "commit over"
18+
19+
echo "push to github"
20+
21+
git push origin master
22+
23+
@REM 如果有需要推送至其他仓库,自行打开注释并修改。 @REM 是 bat 文件的注释
24+
@REM echo "push to another repository"
25+
@REM git push origin2 master
26+
27+
timeout /t 3

0 commit comments

Comments
 (0)