From 3b8bbd3d1f7309cbb2afa69a2ca3fb67d50a1435 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Mon, 1 Nov 2021 09:16:02 -0400 Subject: [PATCH] Add make-push command Add command to update the subtree from a child repo. This pushes to the main branch of the common repo with only the relevant commits. --- .gitlab/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab/Makefile b/.gitlab/Makefile index 465cd3a..cb8e27c 100644 --- a/.gitlab/Makefile +++ b/.gitlab/Makefile @@ -14,3 +14,10 @@ make-update: @git stash -git subtree pull --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash @git stash pop + +.PHONY: make-push +make-push: + @make make-update + @git remote add common git@gitlab.ducoterra.net:services/common.git + @git subtree push --prefix .gitlab common main + @git remote remove common