15 Aug 2015

phpStorm - Github Integration

I'm pretty new to the phpStorm IDE and Github as well. I already have an account on Github and have spent time exploring it; but I'm still not familiar with the way it works. Here's what I'm trying to achieve:-
  1. I have two computers - my main workstation and a laptop, both installed with phpStorm.
  2. I want to backup my code-snippets from my main workstation to Github and then access it from my laptop - so that I can continue working on any machine at my will and yet have access to the latest code changes.
  3. I however do not want to backup entire framework; just the code files I have created.
If someone can tell me how do I go about it, I'd really appreciate it. Even pointers to the right resources would be of great help. I'm currently exploring various ways; and will update if I find anything shareworthy.

Thanks!
Abhishek Rawal

Abhishek Rawal

Electronics and Communication
3 years ago
First set up git in your machine using this manual. If you've already setup git then, create a repo and push the code(Refer this manual) from your workstation. Now, set up git in your laptop and clone your repo. Play with your code now, and once you're done just add file changes for commit (git add .), make local commit (git commit) and push to your repo (git push). It's almost same way like 2nd manual link of pushing code shown above.
3 years ago
Thanks. Let me explore this.
Manish Goyal

Manish Goyal

Computer Science
3 years ago
create a repo on github and commit all code inside that repo using following commands

git init
git clone <repo url>
git add <foldername>
git commit -m "<message>"
git push origin master (master is branch name or if you want then you can create new for different use for e.g you added a chat feature on website then you can create chat branch and add all the chat related code inside that branch

Next whenever you are working on any system run following command
git pull origin master

that's it
Vishal Sharma

Vishal Sharma

Computer Science
3 years ago
I have written a python script that uses oauth on bitbucket git repository to by pass username and password entry while cloning or pushing (to) a repo. Very vaguely written though. Will generalize and make a git repo for that..
3 years ago
Thanks a ton for all your responses folks. Turns out that it's super easy using the phpStorm-GitHub integration plugin. All I had to do was chip in my github credentials and then it enabled the github menu in the right-click options on folders. I can quickly backup all my files.

I'm still very new to this.
Abhishek Rawal

Abhishek Rawal

Electronics and Communication
3 years ago
Kaustubh Katdare
All I had to do was chip in my github credentials and then it enabled the github menu in the right-click options on folders. I can quickly backup all my files.
GUI ruins the fun :/
3 years ago
Abhishek Rawal
GUI ruins the fun :/
I'd have agreed with you if we were in 2001 or 2002; the years I literally spent more time on the terminal prompt than the GUI. But over the period of time, it's the 'productivity' that becomes more important than getting into technicalities.

...and that's how I'm turning from an engineer to a manager. Ouch! 😲
Abhishek Rawal

Abhishek Rawal

Electronics and Communication
3 years ago
Kaustubh Katdare
But over the period of time, it's the 'productivity' that becomes more important than getting into technicalities.
You're mistaken here buddy. CLI increases productivity much more than one can even imagine. Even now if I have to make any changes into file system, I use konsole even though 'Dolphin File Manager' has all he available services, because it is simpler and faster.

But again, to each his own 😀

Share this content on your social channels -

Only logged in users can reply.