0

I am uploading my first sandbox module on drupal 7 but facing some errors.Here are steps i followed according to drupal api.
Under version control tab i found that peace of git instructions and commands to follow.

mkdir my_module_name

cd my_module_name

git init

git checkout -b 7.x-1.x

echo "name = my_module_name" > my_module_name.info

git add my_module_name.info

git commit -m "Initial commit."

git remote add origin userxxx@git.drupal.org:sandbox/userxxx/xxxxxx.git

git push origin 7.x-1.x

When i ran these commands using git bash i got error something like this.

error: src refspec 7.x-1.x does not match any.<br />
error: failed to push some refs to 'userxxx@git.drupal.org:sandbox/userxxx/xxxxxx.git'

What i am missing here? Thanks in advance.

1 Answers1

1

A general solution is to maintain (the correct order of) commands:

git add (to be added files)
git commit -m 'message'
git push origin master --force

Syncing GIT : refspec master does not match any gave me also some great insights on how to tackle it!

Dharman
  • 30,962
  • 25
  • 85
  • 135
Joey Dorrani
  • 247
  • 1
  • 1