tj / tj/git-extras

Add `git-create-submodule` to add submodules from any directory

Open
#170 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18.1k
Forks
1.2k
Avg merge
5d 17h
Merged PRs (30d)
1

Description

Git only accepts adding a submodule from the repository root.

If we know we're not in the root directory why not add the submodule relative to the working directory?

I've added the command to my own dotfiles repository but I can send a pull-request if anyone is interested. Here it is:
https://github.com/ricobl/dotfiles/blob/master/bin/git-create-submodule

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 with the linked implementation at bin/git-create-submodule in the reporter's dotfiles repository, then compare it with the git-extras command layout. The change is done when git-create-submodule can add a submodule when invoked outside the repository root.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.