Monday, 9 March 2015

git best practise

#create a bare git repo in bitbucket where I use the name ora-marketing-site-d7 
 
#get drupal core code from drupal repo
git clone http://git.drupal.org/project/drupal.git ora-marketing-d7
cd ora-marketing-d7/
git checkout 7.34  #use the current stable version
#git tag #view all versions of drupal
 
#update remotes
git remote rename origin drupal #rename origin remote as drupal, cause we don't want upload code to drupal repo
git remote add origin git@bitbucket.org:foundryhq/ora-marketing-site-d7.git  #point origin to our dev repo
git remote -v  #check the result
 
#create a working branch
git checkout -b ora-marketing
 
#push code to our dev repo
git push origin ora-marketing

No comments:

Post a Comment