0

A project I'm working on requires a specific hidden folder inside any cloned git repository; however, this obviates the need to create a .gitignore file, so 2 extra hidden items inside these repositories will be needed, and the end user (developer) should have access to the .gitignore, which may cause issues.

An alternative idea is to place this "hidden" system folder inside the .git folder, then no need for extra .gitignore -or extra hidden folder inside the root of that (local) repo.

This folder and it's contents should remain local and not be pushed upstream in any way, and should not interfere with git in any way whatsoever.

Will this cause any "unforeseen" issues?

2 Answers2

0

If you explicitly do not want to use a .gitignore file inside the git repository you can use the local global gitignore on your computer, as is already described in this answer on Stack Overflow.

Aron Hoogeveen
  • 437
  • 5
  • 16
0

git worktree allows you to have more than one working tree for one clone. This is a quite convenient thing I won't like to miss..

In this case the additional worktrees don't have a .git directory but a .git file. As long as your tools can cope with this it should be OK but it is still a strange use case.

A.H.
  • 63,967
  • 15
  • 92
  • 126
  • indeed @A.H. - it is for a collaborative online developing platform.Git worktrees are already implemented, but usage info & user data needs to be stored at the repo on disk in an SQLite db, along with other configurations inside "the folder", hence the requirement. –  Jan 05 '19 at 16:38
  • After much collaboration and testing this approach works well. I had to change a few things in order to control the repos from inside the worktrees exclusively, but this is indeed the cleanest approach, thank you A.H –  Jan 05 '19 at 21:03