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!

Replies

  • Abhishek Rawal
    Abhishek Rawal
    First set up git in your machine using #-Link-Snipped-#. If you've already setup git then, create a repo and push the code(#-Link-Snipped-#) 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.
  • Kaustubh Katdare
    Kaustubh Katdare
    Thanks. Let me explore this.
  • Manish Goyal
    Manish Goyal
    create a repo on github and commit all code inside that repo using following commands

    git init
    git clone
    git add
    git commit -m ""
    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
    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..
  • Kaustubh Katdare
    Kaustubh Katdare
    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
    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 :/
  • Kaustubh Katdare
    Kaustubh Katdare
    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
    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 😀

You are reading an archived discussion.

Related Posts

Being born and brought up in a traditional Marwadi family where for long being self-employed has been the norm, in the heart of hearts, Pravesh Dudani always knew that he...
Anybody can explain steps or procedures for starting own online retailing. What are the technical and legal terms need to be consider. How taxations and invoices should be generate. Thanks!
I am going to give my AMCAT and Elitmus exams ,so what benefits I can get from my results?And also i want to know about certain this types of exams!
Could someone help me out?? How to determine the mechanical losses in a system
I AM AN ENGINEERING STUDENT JUST PASSED OUT FROM MY COLLEGE BEING AN INFORMATION TECH. STUDENT ,MY FOCUSED IS ON THE IT MARKET AND TECHNOLOGIES BUT ALSO I AM AVERAGE...