03 Engineering / Repository Initialization Standard
03 Engineering

Repository Initialization Standard

The tested procedure for bringing existing Cloudberrie source code into a new organization-owned GitHub repository.

Document: ENG-002Type: SOPStatus: ApprovedOwner: Cloudberrie StudioVersion: 4.2.0Updated: 2026-07-17

Cloudberrie Standard

Organization ownercloudberrie-studio
First repositorycb-website
VisibilityPrivate
READMERequired
.gitignoreNext.js for the website repository
LicenseNone for proprietary code
Local path/Users/cloudberrie/Documents/Cloudberrie/Projects/cb-website

Initialize Existing Local Code

Use this procedure when the source code already exists locally and GitHub has already created a repository with a README and .gitignore.

Open the permanent folder

cd /Users/cloudberrie/Documents/Cloudberrie/Projects/cb-website
pwd

Initialize and connect Git

git init
git branch -M main
git remote add origin https://github.com/cloudberrie-studio/cb-website.git
gh auth setup-git

Review and commit local code

git status
git add .
git status
git commit -m "feat: add initial Cloudberrie website"

Merge GitHub’s initial files

git pull origin main --allow-unrelated-histories --no-rebase

Resolve README or .gitignore conflicts, then:

git add .
git commit -m "chore: merge initial repository configuration"
git push -u origin main

Important Troubleshooting

MessageResolution
Repository not foundConfirm private repository access and run gh auth login; browser login and Terminal authentication are separate.
Need to specify how to reconcile divergent branchesUse --no-rebase or set git config --global pull.rebase false.
Non-fast-forward push rejectedPull and merge remote history before pushing. Do not force-push during normal initialization.
README add/add conflictKeep one approved README, remove conflict markers, stage, commit, and continue.

Validation

git status
git remote -v
git log --oneline --decorate -5
gh repo view cloudberrie-studio/cb-website