Working together

Forks & contributing

A fork is a copy of someone else's repo in your own namespace. Use forks to contribute to repos you can't push to directly โ€” public projects or client repos.

1. Fork the repo

Open the repo โ†’ Fork. The copy appears at https://jianren.cloud/lumbung/<your-nickname>/<repo-name>, with every branch and tag. Forks of private repos stay private and use your storage quota.

2. Work in the fork

git clone https://jianren.cloud/lumbung/<your-nickname>/<repo-name>.git
cd <repo-name>
git switch -c fix/typo
# โ€ฆ edit โ€ฆ
git commit -am "Fix typo in README"
git push -u origin fix/typo

The terminal immediately offers a create merge request link to the parent repo.

3. Open an MR to the parent repo

In the parent repo: Merge requests โ†’ New merge request, choose From repo = your fork, then the branch. The parent repo's maintainers review and merge it like any MR. Every further push to the fork's branch updates the MR automatically.

4. Keeping the fork up to date

git remote add upstream https://jianren.cloud/lumbung/<owner>/<repo-name>.git
git fetch upstream
git switch main
git merge upstream/main
git push

You can have one fork of a repo per namespace. Forking requires approved Lumbung access.