I downloaded and installed the latest Git version 1.8.4.2 from http://git-scm.com. I expected various third party Git modules such as Subtree to be available in /usr/local/git/contrib
for installation. However, the contrib
folder only contains a single folder (completion
) inside of it and no other files or folders.
So I have two questions:
Why are modules missing from the contrib
folder?
How do I install Subtree
in absence of the same from the contrib
folder? (I would prefer installing Subtree from official Git source rather than from https://github.com/apenwarr/git-subtree which is now an obsolete repo)
BTW, I'm running OS X Mavericks
Adding a subtreeSpecify the prefix local directory into which you want to pull the subtree. Specify the remote repository URL [of the subtree being pulled in] Specify the remote branch [of the subtree being pulled in] Specify you want to squash all the remote repository's [the subtree's] logs.
To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .
git subtree allows you to nest a repository as a subdirectory inside another. It's one of the various options for managing project dependencies in Git projects. You add a subtree to an existing repository where the subtree is a reference to another repository URL and branch/tag when you wish to utilize it.
There are a couple ways to install git subtree on mac depending on how you installed git on your system.
If you used homebrew to install git then subtree, along with the rest of the git contrib items, was already placed on your system and can be installed. To install subtree:
/usr/local/share/git-core/contrib/subtree
.make
which will prepare subtree.make prefix=/usr/local/opt/git/ install
. The prefix is important because the default location the makefile knows about is not where it needs to be installed with homebrew.If you downloaded and installed git using the installer from the git website there is a different method to installing git-subtree:
git/contrib/subtree
directory.make
to prepare subtree.sudo make prefix=/usr install
. The prefix is important for it to be installed in the right location. Note, you need to use sudo to install this because of it's location on the system.
reference: how-to-install-git-subtree
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With