nextcloud / nextcloud/app_template
Unable to `git init` because of existig `.git` file
Nobody has claimed this yet.
- 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
- Generate an app using the tool
- Download and unpack
- Run
git initin 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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