项目地址:
https://github.com/roseduan/rosedb
下载代码到本地:
root@ubuntu:~# git clone git@github.com:pony9033/rosedb.git
Cloning into 'rosedb'...
remote: Enumerating objects: 904, done.
remote: Counting objects: 100% (317/317), done.
remote: Compressing objects: 100% (206/206), done.
remote: Total 904 (delta 181), reused 211 (delta 104), pack-reused 587
Receiving objects: 100% (904/904), 509.31 KiB | 554.00 KiB/s, done.
Resolving deltas: 100% (541/541), done.
root@ubuntu:~# cd rosedb/
root@ubuntu:~/rosedb#
查看本地分支:
root@ubuntu:~/rosedb# git branch
* main
root@ubuntu:~/rosedb#
创建一个临时分支:
root@ubuntu:~/rosedb# git checkout -b jack
root@ubuntu:~/rosedb# git branch
* jack
main
root@ubuntu:~/rosedb#
创建于上游项目的链接,这里上游指的是一开始fork的那个项目源https://github.com/roseduan/rosedb.git
root@ubuntu:~/rosedb# git remote add upstream https://github.com/roseduan/rosedb.git
root@ubuntu:~/rosedb# git remote -v
origin git@github.com:pony9033/rosedb.git (fetch)
origin git@github.com:pony9033/rosedb.git (push)
upstream https://github.com/roseduan/rosedb.git (fetch)
upstream https://github.com/roseduan/rosedb.git (push)
root@ubuntu:~/rosedb#
修改代码:
root@ubuntu:~/rosedb# git status
On branch jack
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: storage/db_file.go
no changes added to commit (use "git add" and/or "git commit -a")
root@ubuntu:~/rosedb#
提交代码:
root@ubuntu:~/rosedb# git add .
root@ubuntu:~/rosedb# git commit -m "修改db_file.go,数据库文件加载时,文件名解析何发现判断"
[jack 3dcda2c] 修改db_file.go,数据库文件加载时,文件名解析何发现判断
1 file changed, 17 insertions(+), 8 deletions(-)
root@ubuntu:~/rosedb#
root@ubuntu:~/rosedb# git log
commit 3dcda2cea0f81b493a91ccc33c7d51429f370377 (HEAD -> jack)
Author: jacky <1650727278@qq.com>
Date: Sat Jul 3 11:10:04 2021 +0800
修改db_file.go,数据库文件加载时,文件名解析何发现判断
commit 8125d9e480a199a0dac5b0c9c00d2b4f3321806f (tag: v1.2.8, origin/master, origin/main, origin/HEAD, main, develop)
Author: roseduan <roseduan7@163.com>
Date: Fri Jul 2 13:23:10 2021 +0800
[fix] str set err.
commit 31d9972b61fd8b8e6b8c417743fabba654b4cf10 (origin/develop)
Merge: 8832903 73e0cb3
Author: roseduan <roseduan520@gmail.com>
Date: Fri Jul 2 09:33:09 2021 +0800
Merge pull request #18 from nc-77/main
fix sdiff bug and add more tests
commit 73e0cb37b9f5410ee77720574910c4c10e13624d
把本地提交的代码推送到自己的github分支
root@ubuntu:~/rosedb# git push origin jack
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 613 bytes | 306.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To github.com:pony9033/rosedb.git
* [new branch] jack -> jack
root@ubuntu:~/rosedb#
在自己的github找到刚才的修改(这里是jack分支),创建pr:
去github开源项目地址,查看本次pr的进度
状态现实还在等待审核中。
点击查看修改内容:
相关阅读 >>
Golang语言(打卡✏️第四天)fmt格式化工具|Go主题月
Go语言中container容器数据结构heap、list、ring
更多相关阅读请进入《Go》频道 >>

Go语言101
一个与时俱进的Go编程知识库。