Skip to content

<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 ​

Home | Changelog

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-name

Then enter the cloned directory:

bash
cd client-name

2. 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 upstream

Optional safety step: prevent accidental pushes to upstream.

bash
git remote set-url --push upstream no_push

Optional 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/master

4. 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 -> PHP

Then add it as your new origin:

bash
git remote add origin git@bitbucket.org:devteamadvisable/v4-client-name.git

Create and switch to a new branch for the client:

bash
git checkout -b client-name

5. Push the Client Branch ​

Push the current client branch to the new origin and set tracking:

bash
git push --set-upstream origin client-name

6. 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.