Convert FTP > GIT

Posted on April 21, 2020 by jamie

Assume FTP deployed code on production is “master”

Update .gitignore – legacy deployed site don’t tend to have them, don’t want to add logs/media etc into the repo.

git init

git remote set-url origin <remote_url>

Create or update .gitignore

git add .gitignore

git commit -m"add .gitignore"

git add .

git commit -m"convert live site too git, force all files into repo"

git push -f origin master 
git status