惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
小众软件
小众软件
J
Java Code Geeks
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
L
LangChain Blog
博客园 - 司徒正美
量子位
Y
Y Combinator Blog
C
Check Point Blog
T
Tailwind CSS Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志

blag

SQLite prefixes its temp files with `etilqs_` - blag Setsum - order agnostic, additive, subtractive checksum - blag Oldest recorded transaction - blag Replacing a cache service with a database - blag SQLite commits are not durable under default settings - blag PSA: SQLite WAL checksums fail silently and may lose data - blag Rickrolling Turso DB (SQLite rewrite in Rust) - blag Collection of insane and fun facts about SQLite - blag How bloom filters made SQLite 10x faster - blag In search of a faster SQLite - blag Galloping Search - blag Building a distributed log using S3 (under 150 lines of Go) - blag Zero Disk Architecture - blag PSA: Most databases do not do checksums by default - blag PSA: SQLite does not do checksums - blag Disaggregated Storage - a brief introduction - blag Why does SQLite (in production) have such a bad rep? - blag SQLite Slaps - blag Now - blag Learning C - blag Snapshot Testing - blag Win: contribution to libSQL (SQLite) codebase - blag Errata in Hekaton MVCC paper - blag Internet is wholesome: MVCC edition - blag It is becoming difficult for me to be productive in Python - blag MongoDB secondary only index - blag Introducing CaskDB – a project to teach you writing a key-value store - blag Recurse Center: Winter Break - blag Recurse Center Day 24: Hacking Go compiler to add a new keyword - blag Recurse Center Day 20: Django v4 upgrade (from v1) - blag
Git/Github fork-pull request-update cycle - blag
2016-02-20 · via blag

Lets say there is a project called python and you want to contribute. So you should fork python project and ALWAYS create a separate branch for the patch/feature you are working on and NEVER commit on the master branch of forked repo.

Lets call your forked repo as python-forked.

Once you fork a project, add a git remote called upstream (or whatever name you feel like using), which points to original repo. This remote will help you keep your project updated and in sync with original repo (from where you forked).

$ cd python-forked
$ git remote add upstream https://github.com/guido/python.git 

Consider 3 scenarios.

The simple, fork and send PR

Create a new branch, name it on the patch/feature you are working on:

$ cd python-forked
$ git checkout -b bugfix-unicode-strings

Work on bugfix-unicode-strings and make all the changes you want. And then do a push to your github account, which is usually origin remote:

$ git push origin bugfix-unicode-strings

And then send PR, to master branch of guido/python, with your branch bugfix-unicode-strings.

Now, tomorrow, guido may add new features and you might want to update your forked repo. It’s simple, just pull from the upstream to master branch of python-forked

$ cd python-forked
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master

Update and PR

You have forked the project and maintainer has later moved on and added new features which you need in the current patch you are working on

You need to fetch the new changes from upstream and put those in your patch branch. While doing this, usually I update my master branch also:

$ cd python-forked
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git checkout existing-patch-I-am-working-on
$ git rebase master

You could also do $ git rebase upstream/master in last step to update the current patch branch.

Update, resolve conflicts and PR

You have forked the project and maintainer has made some changes to the file you are also working on

Fetch the changes and merge it with current patch branch you are working:

$ cd python-forked
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git checkout existing-patch-I-am-working-on-which-has-a-file-edited-by-guido
$ git rebase master

above rebase will fail(?) (or interrupted) and terminal will ask you to resolve the conflicts and then merge.

usually:

# solve the conflicts
$ git rebase --continue

References

  • Syncing a Fork - link
  • Merging an upstream repository into your fork - link
  • How to update a GitHub forked repository? - link