nextcloud / nextcloud/app_template

Unable to `git init` because of existig `.git` file

Open
#266 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
PHP
Stars
13
Forks
5
Avg merge
3d 1h
Merged PRs (30d)
2

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce
  1. Generate an app using the tool
  2. Download and unpack
  3. Run git init in the root directory of the app
Expected behaviour

Initializing a Git repository, so you can put the app under version control.

Actual behaviour
$ git init
fatal: not a git repository: /home/[...]/Documents/projects/nextcloud/my-app/../../../.git/modules/nextcloudappstore/scaffolding/my-app
Additional info

The reason the git init command doesn't work, is that the generated app comes with is a .git file that contains the following line:

gitdir: ../../../.git/modules/nextcloudappstore/scaffolding/my-app

If this is not a bug, but intended behavior, maybe someone can explain the reasoning behind this, so I can learn. Also, I would like to know what the recommended way is to put a new app under version control.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the generated app's .git file and the tool used to generate the app, focusing on why it points to ../../../.git/modules/nextcloudappstore/scaffolding/my-app. Done means establishing and documenting a generation result that can be initialized as a standalone Git repository, or clearly documenting the recommended version-control workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, php
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.