The past few Days I have put all my Projects as a GIT-Repository to for the obvious reason to have a Backup and easily Rollback changes if necessary.

What cost me a little effort was the process of getting my PHPStorm-Projects which are created from a remote (S)FTP Location into BitBucket so that I’m able to push and pull to/from the Repository and at the same time able to upload my changes via (S)FTP to the Webserver.

So if you might want to do the same this could be helpful.

I presume
…you have a BitBucket Account set up.
…you have PHPStorm installed
…you have GIT installed

1. Open PHPStorm and create a new project from a remote (S)FTP Location with the „New Project from existing Files…“ option

2.  Create a new GIT Repository in BitBucket

2. Open your Project in PHPStorm

3. Open the Menu ‚VCS‘ and choose ‚Enable Version Control Integration‘

4. Open the Git Bash  and do the following

cd /path/to/my/phpstorm/project
git remote add origin
git add *
git commit

Enter a Description for the Submit and Save
(i.e. vi style save: i – Enter your Description – ESC – :wq – Enter)

git push -u origin --all

Your are done. Now you can use your Remote PHPStorm Project with a GIT BitBucket Repository.
Change a File and use ‚VCS -> Commit Changes‘ to commit and push your changes.