We are in the process of changing our SCM to BitBucket. Currently we use Clearcase SCM and there we have code in different stages / streams - Dev, UAT and production, where
You don't need to switch to a ClearCase view and initialize your repo there.
Keep your local Git repo separate, ready to push to its remote repo.
Each time you want to add a coherent state from ClearCase, stay in your git repo and type:
git --work-tree=/path/to/ClearCase/view/aVob add .
git commit -m "Add state from CC view"
git push
Then change the config spec of the CC view to its next baseline (or full label), in order to represent the next coherent state (since ClearCase is file-based, and has no notion of commits beside an UCM baseline).
And add again the new content of that same view to your same local Git repo (same branch). And push again.
My basic question is - If I have set of files that I want to add to
develop
branch instead ofmaster
branch and I did a ‘git init’ -> ‘git add --all’ -> ‘git commit –m “Initial Commit” ‘ -> ‘git remote add origin ssh://ourBBserver.com:7999/EN/apprepo' ,
First: don't git init. If you have a master branch that means you already initialize a repo somewhere else.
Go to that repo, create a develop branch and add the content matching the CC view set for that CC develop branch
cd /path/to/my/repo
git checkout -b develop
git --work-tree=/path/to/ClearCase/view/aVob add .
git commit -m "add content of CC develop branch (no history though)"
git push -u origin develop