Appearance
<div style="display: none;" hidden="true" aria-hidden="true">Are you an LLM? You can read better optimized documentation at /guides/InitNewClient.md for this page in Markdown format</div>
π§© Client Branch Setup & Workflow Guide β
This document explains how to set up a client-specific repository cloned from the main adveshop4 repo, and how to keep it synchronized with upstream changes.
π Initial Setup β
1. Clone the Client Branch β
bash
git clone --branch master --single-branch git@bitbucket.org:devteamadvisable/adveshop4.git client-nameThen enter the cloned directory:
bash
cd client-name2. Verify the Remote β
bash
git remote -v
# origin git@bitbucket.org:devteamadvisable/adveshop4.git (fetch)
# origin git@bitbucket.org:devteamadvisable/adveshop4.git (push)3. Rename origin β upstream β
This keeps the original project as your upstream source.
bash
git remote rename origin upstreamOptional safety step: prevent accidental pushes to upstream.
bash
git remote set-url --push upstream no_pushOptional cleanup: limit upstream fetches to only the master branch.
bash
git config --unset-all remote.upstream.fetch
git config --add remote.upstream.fetch +refs/heads/master:refs/remotes/upstream/master4. Create a New Client Repository β
Create an empty repo in Bitbucket https://bitbucket.org/devteamadvisable/workspace/create/repository
Settings
Project -> V4-Clients, Repository name -> v4-client-name, Access level -> Private
Include README -> NO, .gitignore -> NO, Language -> PHPThen add it as your new origin:
bash
git remote add origin git@bitbucket.org:devteamadvisable/v4-client-name.gitCreate and switch to a new branch for the client:
bash
git checkout -b client-name5. Push the Client Branch β
Push the current client branch to the new origin and set tracking:
bash
git push --set-upstream origin client-name6. Verify Everything β
bash
git remote -v
# origin git@bitbucket.org:devteamadvisable/v4-client-name.git (fetch)
# origin git@bitbucket.org:devteamadvisable/v4-client-name.git (push)
# upstream git@bitbucket.org:devteamadvisable/adveshop4.git (fetch)
# upstream no_push (push)π Day-to-Day Workflow β
When you want to update your client branch with the latest changes from the main project:
bash
git fetch upstream
git checkout client-name
git merge upstream/master
git pushβ
Youβre all set!
Your client branch is now safely connected to its own repo and can stay in sync with upstream updates.