Tag: Git
-
GitLab CI/CD: Weird Tag Behavior
While setting up Publisher for a private company, I found weird behavior: the tags from previous job is carried over to the release job. This causes problem because it triggers unnecessary tag releases. To fix this, just set the GIT_STRATEGY variable to clone instead of fetch. Reference: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#configure-runner-behavior-with-variables See the change context here: https://gitlab.com/chez14/publisher/-/commit/d1f7cb50c5d0461b182c622fc2bed395e56f6c26. This…
-
Git Prune Branches
This one is from .gitconfig in home folder:
-
Git Submodules: Clone, Push All Submodules Automatically, and Remove.
Right after cloning the project, init the submodule with: Then (if you need), go to that submodule’s folder and checkout to the branch. Pushing Submodules Commit From Root Project When pushing from root git, and git submodule actually have several commit to push too, the git root actually wont push with following error message: According…