Thevetats Ramblings

Explore

About
Blogs
Misc
Resume
Services
Testing
Tools

Blogs

Env

Freshstart

Aliases
How I config my System76
Un-F%ck your M2 for development
ZSH Functions

Toolbelt

What's usually in the workvan

Rust

Notes

Primeagen's Rust for TS Devs

RustGoTs

Primeagen's Polyglot Class 1
Primeagen's Polyglot Class 2
Primeagen's Polyglot Class 3

Tauri

Setting up Tauri with Vite

WebDev

Ai

TheBeast

Slaying the beast

ComponentLibary

Salt Life
Submodules in Git

Sql

Useful SQL

Unocss

Just one more...
Setting up UnoCSS in a Vite Project

Vue

Reference

Suspense
Transitions

Submodules in Git

Published
January 26, 2022
Tags
#component library#vue#web dev

Table of Contents

  • Adding a submodule to a repo

Creating a git Submodule

Adding a submodule to a repo

Never did this before.

The base components have existed in src/core/components/base since their inception.

With the component library pushed now as a git repo, I simply:

bash
rm -r -f src/core/components/base

Committed and pushed this to the repo, then:

bash
git submodule add git@gitlab.com:thevetat/saltsubmod.git src/core/components/base/

Pushed that and was good to go.

Still need to fix this up a bit and test edge cases

bash
function update-submodule() {
  cd src/core/components/base/
  git pull origin main
  cd ../../../../
  git add src/core/components/base/
  git commit -m "Update base components to latest version"
  git push
}
bash
git submodule update --init --recursive --remote
Made from scratch with ❤️ by Thevetat