Home ›
Maintaining a Drupal project with Git: Vacating the master branchMaintaining a Drupal project with Git: Vacating the master branch
Submitted by Benjamin Melançon on June 22, 2012 - 10:15am
If you've already been committing code to master, do this to start a new 7.x branch and kill off the code in the master branch so noone gets confused.
cd /path/to/repo
git checkout -b 7.x-1.x
git push origin 7.x-1.x
git checkout master
git rm -r *
echo "Real code is not kept on the master branch, to see the code: git checkout 7.x-1.x" > README.txt
git add README.txt
git commit -m "Add a README explaining that the master branch is empty."
git push origin master
Now get back to development!
git checkout 7.x-1.x
See also:
Searched words:
drupal git master 7.x-1.x README branches
maintaining a module with git
Comments
Post new comment