introducing git to your ftp workflow
TRANSCRIPT
Introducing
to your ftp workflow
Introducing myself
Roman Rus@RomSocial
using WordPress since 2008
git initgit add .git commit –m “First commit”git commit -am “First update“
git clone https://github.com/WordPress/WordPress.gitgit remote add origin https://github.com/user/repo.git
git push origingit pull origin
+ History+ Undo+ Sharing Code+ Backup
– Collaboration– Not great sync– FTP is still used
cd /your/code/dir/git initgit commit -am "First commit"
+ History+ Undo+ Collaboration+ Test / Stage / Prod
– Installation of python plugin– Setting it up is a bit complicated– What if someone changes web files– FTP credentials in git config files
https://github.com/ezyang/git-ftp
git clone --bare https://github.com/name/repo.git
+ History+ Undo+ Collaboration
– What if someone changes web files
git clone --bare https://github.com/name/repo.git
# post-receivedeploy_to_dir = File.expand_path('../work')`GIT_WORK_TREE="#{deploy_to_dir}" git checkout -f master`
http://krisjordan.com/essays/setting-up-push-to-deploy-with-git
+ History+ Undo+ Collaboration+ Test / Stage / Prod+ Remote Tracker
git init git add . git commit –m “initial”git remote add https://bitbucker.com/user/repo.git
git clone --bare https://bitbucker.com/user/repo.git remote.git
git --git-dir tracker.git remote add remote.git
# post-receiveexec git --git-dir /path/to/tracker.git pull
References
• https://github.com/mislav/git-deploy• http://krisjordan.com/essays/setting-up-push-
to-deploy-with-git• https://www.digitalocean.com/community/tut
orials/how-to-set-up-automatic-deployment-with-git-with-a-vps