In the Commit tool window Alt+0, expand the Unversioned Files node. If you are creating multiple Git repositories inside the project structure, repeat the previous steps for each directory.Īfter you have initialized a Git repository for your project or directory, you need to add files to the repository. 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. In the dialog that opens, specify the directory where a new Git repository will be created. In the Files tool window, select the project that you want to put under Git.įrom the main menu, choose Git | Create Git Repository. Associate different directories within the project with different Git repositories If there is no Enable Version Control Integration option available in the VCS Operations Popup, it means that Git version control is already enabled for the project. You can choose Always Add to synchronize project settings with other repository users who work with DataGrip. The entire project then will be associated with a single Git directory, so there is no need to add each file to the Git directory individually.Īfter VCS integration is enabled, DataGrip will ask you whether you want to share project settings files via VCS. Press Alt+` to open the VCS Operations Popup and select Enable Version Control Integration.Īlternatively, from the main menu, select Git | Enable Version Control Integration.Ĭhoose Git as the version control system and click OK. Associate the entire project with a single Git repository You can create a local Git repository based on the existing project. Put an existing project under Git version control In the Trust an Open Project ''? project security dialog, select the way you want to open the project: Trust Project or Preview in Safe Mode. The entire project will be associated with the remote Git repository. Type the path to the directory that you want to associate with a version control system, or click the Browse button ( ) and select the dumps directory.Ĭreate a project by cloning a Git repositoryĭataGrip allows you to check out (in Git terms clone) an existing repository and create a new project based on the data you've downloaded. In the Add VCS Directory Mapping dialog, select the Directory option. This page shows a list of project directories and version control systems associated with them (if no directories have been added, the list only contains the project root). In the Settings dialog ( Control+Alt+S), open version control settings ( Version Control | Directory Mappings). Register the VCS root directory by doing the following: In the file browser that opens, navigate to the cloned directory and open it. In the Files tool window ( View | Tool Windows | Files), click the Attach Directory to Project button ( ) in the toolbar. In the Trust an Open Project ''? project security dialog, click Don't Open to stay in the current project with the database connections and other settings. If you are already logged in to the selected hosting service, completion will suggest the list of available repositories that you can clone. In the Get from Version Control dialog, specify the URL of the remote repository you want to clone, or select one of the VCS hosting services on the left. If no project is currently opened, click Get from VCS on the Welcome screen. If the version control integration was already eenabled for the project, select Git | Clone. To start cloning a Git repository, do one of the following:įrom the main menu, select Git | Get from Version Control. Only the attached directory will be associated with the remote Git repository. Clone and attach a directory to the existing projectĭataGrip allows you to check out (in Git terms clone) an existing repository and attach the directory with cloned files to the existing project. If you need to manually configure DataGrip to use Git from WSL, go to the Version Control | Git page of the IDE settings Control+Alt+S, click the Browse icon in the Path to Git executable field and select Git from WSL via the \wsl$ path, for example, \\wsl$\debian\usr\bin\git. Also, DataGrip automatically switches to Git from WSL for projects that are opened when you use the \\wsl$ path. If Git is not installed on Windows, DataGrip searches for Git in WSL and uses it from there. If the IDE can't locate a Git executable, it suggests downloading it.ĭataGrip supports Git from the Windows Subsystem for Linux 2 (WSL2), which is available in Windows 10 version 2004. When you clone an existing Git repository, or put an existing project under Git version control, DataGrip automatically detects if Git is installed on your computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |