Setting up Git with Webstorm and Bitbucket

 

  1.  Install Git download from here.


    Make sure that the git is in environment variables by using command prompt. If not, add paths in environment variables according to installation location of git, such as given below.
    NOTE: your location may be different than mine (C:\Program Files\Git). If you have done #2 successfully then when you type git in a command window you will see the following:


  2.  Take Existing Project and associate with a new LOCAL Git repository

    1. Open the project that you want to put under Git.
    2. From the main menu, choose VCS | Enable Git Integration OR Enable VC ControlIntegration
    3. In the dialog that opens, select Git from the drop-down list and click OK.

    Git does not support external paths, so if you choose a directory that is outside your project root, make sure that the folder where the repository is going to be created also contains the project root.

     

    1. From the main menu, choose VCS | Import into Version Control | Create Git Repository.
    2. In the dialog that opens, specify the directory where a new Git repository will be created.
  3. Add files to the local repository

    You can also add files to your local Git repository from the Project tool window. Select the files you want to add, choose Git | Add from the context menu.

     

  4. Commit files you added to local repository

    VCS->Commit

    ....now add messages, author etc as you wish and push the changes by selecting COMMIT AND PUSH

  5. Add remote repository (you must have already created one on BitBucket or GitHub)

    VCS->Git->Remotes

    AND then add with + a new repository --it will ask for you URL and later you password

  6. Any time you want to commit and push: VCS->Commit then select what you want and push


    here you can see the results of pushing it on the remote repository I have on BitBucket

     

     

    Now I am going to add a gitHub resgistry rather than a BitBucket one

    VCS->Import into Version Control->Share Project on GitHub (assumes you already have an account on github)

     

    Now I will commit in WebStorm and it will commit to this new remote repository


 

© Lynne Grewe