0

I'm following the Unity 3D guide to enable SmartMerge in Git, but I'm quite confused. It literally says:

Add the following text to your .git or .gitconfig file

but I don't have any in my repo. I know there is a .gitconfig file which is global for the whole Git installation, and thus it doesn't seem very logic as a place to put repo-specific settings, and .git is a folder in git repos, not a file.

Where do I have to put those lines?

3
  • .git is typically a hidden folder in the root of your repository. If you're using worktrees this gets muddled but I assume you're not there yet. .gitconfig is a file in your "home" directory, like C:\Users\USERNAME, or it can mean config which is located in the aforementioned .git folder. Commented Mar 9, 2018 at 12:54
  • I know it's a folder, that's why the mention of a .git file bugs me. Commented Mar 9, 2018 at 12:54
  • .git can be a file if you're using worktrees, it is then located in the root of the worktree and contains information about where the .git folder is located. This file should not be edited, however, so if you're supposed to add something to .git then it has to be the folder. Commented Mar 9, 2018 at 12:56

1 Answer 1

2

The file where you should put those lines is actually config in the .git folder. Don't know why the Unity docs are so confusing about this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.