Taking git to the next level!
hju is a tool to manage a set of repositories in a parent repository. The biggest difference with git submodules is that submodules points to specific commits in the child repositories. The managed repositories are in a file named hju.json and the folders are ignored using .gitignore when using hju to add repositories.
echo "deb [trusted=yes] https://apt.fury.io/bztk/ /" | sudo tee /etc/apt/sources.list.d/bztk.list > /dev/null
sudo apt update
sudo apt install hju
Add the following YUM Repository: https://yum.fury.io/bztk/
sudo yum install hju
Download the suitable release and unpack it.
Creates or updates hju.json and .gitignore You do this in an existing repository:
Example:
hju add [email protected]:vandmo/dependency-lock-maven-plugin.git
hju add [email protected]:vandmo/google-java-format.git
git commit -a -m"Initial commit"
git push
This will have created a file named hju.json which contains a list of the added repositories. .gitignore will also have been updated to exclude the folders dependency-lock-maven-plugin and google-java-format.
Cleans all managed repositories.
Clones all child repositories.
Prints how each managed repository diverges from a specic commit.
The commit can be a branch name or anything supported by git rev-list
.
Runs git pull --ff-only
in all child repositories.
Runs git fetch
in all child repositories.
Normalizes hju.json and makes sure all entries are in .gitignore
Lists all managed folders. Can be used as pipe input.
Removes a repository based on its folder name.
Lists all managed repositories. Can be used as pipe input.
Resets to a commit in all managed repositories.
Restores all managed repositories.
Prints a summary of the status of all child repositories.
Switches to a branch in all managed repositories. Optionally creates it if missing.