Installing wordpress in a subdirectory using git, but without using git submodules

I am working on a localhost for working WordPress using git (based on the publication of Mark Jaquith Wordpress Local Dev). My file structure looks like this:

local.dev

  • .git
  • index.php
  • .htaccess
  • -config.php
  • local-config.php (ignored)
  • content / topics /
  • content / plugins /
  • contents / upload / (ignored)
  • core / (wordpress core)

What I want to do is grab the last wordpress from github and put it in the kernel / so that the update process looks like

rm -rf wordpress
svn export http:// core.svn.wordpress.org/trunk/ wordpress
git add --all wordpress
git commit -m 'Upgrade WordPress' wordpress
git push origin master

BUT I get damn time figuring out how to put Wordpress in my own directory without

  • using svn
  • use git to insert the local.dev file and move the files to the kernel / manually.

What am I missing?

thank

+3
source share
2

, .

Wordpress

Wordpress repo - diff diff Wordpress

#Create new repo as the wordpress parent
mkdir wprepo && cd wprepo
git init
touch README
git add .
git commit -m 'initial commit'

#Add the github mirror as a remote repo
git remote add wordpress git://github.com/markjaquith/WordPress.git

#Get the tags
git fetch -t wordpress

#Merge with the required tag
git merge --squash --no-commit -s recursive -X theirs tags/3.3.2
git commit -m '3.3.2'

Dev

, local.dev/ ( - git --bare init). , wordpress.

#Create new repo as the wordpress parent
mkdir local.dev && cd local.dev

#Clone remote development repo
git clone ssh://gituser@remote_server_domain.com/home/gituser/gitrepo .

#Merge remote wordpress repo into core/
remote add -f core ssh://gituser@remote_server_domain.com/home/gituser/wprepo
git merge -s ours --no-commit core/master
git read-tree --prefix=core/ -u core/master
git commit -m 'merging wprepo into core/'

#Push changes to the remote dev repo
git push origin master

( , .), . , .


+3

All Articles