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 dev has code that developers are currently working on, UAT has completed changes being tested by BPs and Production has code that is deployed to production.
In BitBucket, our admins have defined 3 branches: develop, test and master.
For one of our applications, in CC, we have code in each of the states, so I was trying to add code from dev stream to develop branch in BitBucket.
I am using a brand new created repo. All the branches in the repo have a README.TXT file.
The commands I am using are
# 1. create a Project & Repo in Bitbucket named __apprepo_
# 2. create a Snapshot view on your workstation from Clearcase for the application that you want to migrate
# 3. at the DOS command line, change directory to the root of your snapshot view
# 4. type ‘git init’
# 5. type ‘git add --all’
# 6. type ‘git commit –m “Initial Commit” ‘
# 7. type ‘git remote add origin ssh://ourBBserver.com:7999/EN/apprepo
# 8. type ‘remote –v’
# 9. type ‘git pull origin develop’
# 10. type ‘git push –u origin develop’
When i run #9, I get the following error :
error 22-Jul-2016 20:45:10 warning: no common commits
error 22-Jul-2016 20:45:10 From ssh://ourBBserver.com:7999/EN/apprepo
error 22-Jul-2016 20:45:10 * branch develop -> FETCH_HEAD
error 22-Jul-2016 20:45:10 * [new branch] develop -> origin/develop
error 22-Jul-2016 20:45:10 error: src refspec develop does not match any.
error 22-Jul-2016 20:45:10 error: failed to push some refs to 'ssh://ourBBserver.com:7999/EN/apprepo.git'
But for #9 and #10, if I change develop
to master
, it works.
what can I do to move the code to develop
branch directly? And same with test
branch