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
Searched words:
drupal git master 7.x-1.x README branches
maintaining a module with git
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.xSee also:
More like this
- Putting a local project maintained in git on a server as a central repository
- Cloning git locally to test a Drupal module in development on multiple sites
- Use Git to commit to CVS, such as for maintaining a Drupal module
- Drupal Community Participation Resources
- Maintaining a module on Drupal.org with CVS: committing changes


Comments
Post new comment