Creating a New Project with Git
Creating a new project after establishing a central repository gives you the option to immediately link your Workbench project with the central repository. This allows you to begin committing and pushing changes from the very beginning of the project.
There are two ways to link a central repository to a new Workbench project: by cloning the central repository from an existing URL or by linking the project to a local Git repository.
-
Open the New Project dialog box by using one of the following methods:
-
Click File > New > New Project.
-
In the File > Open Project dialog box, at the lower left, click Create New Project.
-
In the Tools > Server Settings > Projects sub-tab, at the top of the project listing, click Add Project. The New Project dialog box displays.
-
-
In the Project Name box, enter a name for the project.
-
In the Project Root box, edit the path or folder name if you want to use a root other than the default. The Project Root automatically populates using the currently active DiveLine connection projects path and appends that path with the project name.
-
In the Initial Contents box, select Clone from git. Enter the URL for the central repository.
-
Click OK.
NOTE: Depending on the configuration of your Git repository, a prompt might appear to provide credentials to link the central repository to the new Workbench project.
For more details see Cloning Repositories.
-
Open the New Project dialog box by using one of the following methods:
-
Click File > New > New Project.
-
In the File > Open Project dialog box, at the lower left, click Create New Project.
-
In the Tools > Server Settings > Projects sub-tab, at the top of the project listing, click Add Project. The New Project dialog box displays.
-
-
In the Project Name box, enter a name for the project.
-
In the Project Root box, edit the path or folder name if you want to use a root other than the default. The Project Root automatically populates using the currently active DiveLine connection projects path and appends that path with the project name.
-
In the Initial Contents box, select Local Repository. Enter the file path for the central repository.
-
Click OK.
Ignore Patterns and Project Status
Every Git project has ignore patterns. These determine which files are excluded from being sent to the central repository. Additionally, you can use the Workbench status GUI to confirm that your project is configured properly and see what files need to be committed to the central repository.
After a new Workbench project is created with a linked Git repository, you can set ignore patterns to ensure that certain file types and directories are not committed and pushed to the central repository. To manage ignore patterns, including viewing, editing, adding, and deleting patterns, click Tools > Version Control > Add Ignore Pattern. A default gitignore file is created with the new project upon clicking Add Ignore Pattern. You can replace the default gitignore file in the project explorer or modify ignore patterns in the Ignore Patterns editor. See Managing Ignore Patterns.
Using the GUI, you can view the status of your project. The status shows where your project branch stands in relation to the branch master and what changes have not been committed yet. Right-click on Project > Version Control > Status. For example:
After you make changes to your new Workbench project, commit and push those changes to the central repository.
See also: