Preparing for Team Development Using Git
Setup Procedure
Assuming that Git itself is already set up, please follow the steps below.
- Confirm that
NDMergeis installed.
- Execute the following command:
git config --global merge.NDMerge.name
- If
NDMergeis installed, the following response will be returned:
nd diff merge application
NDMergeis automatically installed in the Next Design installation folder when the Next Design main program is installed.
If it is not installed, please reinstall the Next Design main program.
Please note that if you install Next Design later in an environment where NDMerge is already installed, existing settings will be overwritten.
- Configure gitattributes.
- To use
NDMergewhen merging Next Design model files and other files with Git, you need to configure gitattributes. This section explains how to configure it per repository and per user.
Configuring per repository
- Create and place a
.gitattributesfile in the Git repository you want to configure. - Add the following content to the
.gitattributesfile:
# NDMerge
* .nproj merge=NDMerge
* .nmdl merge=NDMerge
* .nprof merge=NDMerge
- Commit and push the
.gitattributesfile to the Git repository.
Configuring per user
- Create and place a
.gitattributesfile in any location on your local PC. - Add the following content to the
.gitattributesfile:
# NDMerge
* .nproj merge=NDMerge
* .nmdl merge=NDMerge
* .nprof merge=NDMerge
- Execute the following command to set the placed
.gitattributesfile as a global environment.
git config --global core.attributesfile [absolute path to .gitattributes file]
- Install
NDGit.
- Refer to here for installation instructions.
- Register the Next Design project files with Git.
- Add the project files to be registered to your local repository, commit, and push.
Next Design project files are saved in JSON format, so you can check the differences in text format.
For information on JSON format notation and displaying differences, please refer to here.
When using Git, filenames may appear garbled in the repository's commit history.
For information on how to prevent garbled characters, please refer to here.