

Go to Git | Remotes…Ĭhoose the repository you need and click +. The final thing we need to do is to add this remote repository to our local one. If you used the option Initialize this repository with a README, don’t forget to pull your repository before pushing commits. Log in to your account and click + | New repository.ĭefine all the fields you need and click Create repository. Now let’s create an empty remote repository on GitHub. Go to VCS | Import into Version Control | Create Git repository.Ĭhoose the folder. First, we need to create a Git repository on our machine which will then will be linked with the remote one on GitHub. If you have already and worked with it – great! Suppose we have a MyScripts folder which we want to share on GitHub. If you have no folders attached yet, you can do it from the context menu. When you work with files in DataGrip, you need to attach the directory from your computer to the Files tool window. In some cases, the Local History is the only thing you need, but sharing scripts on GitHub can also be a good idea. Perhaps you’ve realized that you can’t track changes on your SQL files and you cannot revert to previous versions of your scripts. Sharing the user scripts directory on GitHub Now you’re ready to change your files, commit, and push your changes! To do that, go to Settings | Version Control, locate the folder that is needed, and click +. The only thing left to do is to register root. Open the Files tool window ( Alt/Cmd+2). The connections are in the left part, but the directory mapped to the GitHub repository isn’t attached and you don’t see it in the Files tool window. If you click Yes, it will suggest that you create a new project. In our example, we will clone the public DataGrip repository with various database dumps: īy clicking No, you indicate that you want to work with the repository from an existing project where you have already attached directories and have connections. Paste the link to the GitHub repository in the URL field and click Test. Anyway, there is a way to do this through the menu too – see our screenshot. We should mention that all the actions, including this one, can be performed from any place in the IDE via Find Action ( Ctrl/Cmd + Shift + A). Suppose you want to work with an existing GitHub repository. Let’s go through the use cases we mentioned above.Ĭloning an existing GitHub repository with SQL-scripts and other files If everything is OK, you’ll see that your account is linked. The GitHub plugin is a must if you use two-factor authentication. Add your GitHub account there so the IDE is able to connect and use it during interactions with GitHub. Once you’ve installed these two plugins and restarted DataGrip, please go to Settings | Version Control | GitHub. This happens because we use a special plugin repository in DataGrip. Note that they can appear at the end of the list. They’re both provided by JetBrains, which is indicated by the small JB icon on them. Since we’re going to work with GitHub, we’ll need the Git Integration plugin and the GitHub plugin.
#DATAGRIP LOGO INSTALL#
To have support for a particular version control system, please install the corresponding JetBrains plugin from Settings → Plugins. In DataGrip, VCS support doesn’t come out of the box.

We’ll cover two general use cases: - Cloning an existing GitHub repository with SQL scripts and other files - Sharing a user scripts directory on GitHub DataGrip is no exception! But because database developers usually do things a little differently from other developers and because DataGrip’s project model has its own specific workflow, the integration between the IDE and VCS support isn’t quite as straightforward as with other JetBrains IDEs.
