adobe / adobe/aem-project-archetype
Add an option to initialize a git repo with the base archetype files as the initial commit
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
As a person who has spun up many projects using this archetype, it would be nice it the archetype could initialize and commit the generated files at the end of the project generation.
Name: `initGitRepo`
Description: `Initializes a git repo with the generated project files as the initial commit.`
Options: `y` (default), `n`
Commands to run (working directory would be the project dir that was generated):
* `git init`
* `git add *`
* `git add .gitignore`
* `git commit -m "Initial commit."`
If `git` is not available, then the step can either fail hard, with only the default OS message about the missing command. Optionally, the script that runs the commands can first check for the existence of `git` and provide a more user-friendly error message with a more graceful exit.
Since this would be the final step after the archetype has run, if the repo-creation steps fail, the project is still a valid project, but without the initialized git repo.
Contributor guide
Research direction
Locate the archetype option handling and the final project-generation step. Add the initGitRepo option with its default behavior, then verify that the generated directory runs the requested Git commands and remains usable when Git initialization fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100