CI

Chester Wyke September 03, 2023 Updated: April 15, 2025 #rust

Source: https://youtu.be/xUH-4y92jPg?si=3eY_i02onu60bVQ4&t=495

Source GitRepo: https://github.com/jonhoo/rust-ci-conf/

Our GitRepo: https://github.com/wykies/rust-ci-conf/

Link to CI Repo

To add to a repo with option to pull changes later

For SSH

git remote add ci git@github.com:wykies/rust-ci-conf.git

For HTTPS (Not tested)

git remote add ci https://github.com/wykies/rust-ci-conf.git

Fetch from CI Repo

git fetch ci

Initially merge into current history

Warning: If you are using gitflow, initialize it BEFORE doing this. See reason / case tested. And DON’T use the sync button in vscode until you do the git push at the end of the instructions.

git merge --allow-unrelated ci/main

Push Changes

NOTE: use the command line for this not the sync button in vscode.

git push

Update with new CI config

When the CI has been updated and you want to pull in the updates use the following command.

git merge ci/main

Explanation of problem situation

Problem is that I was using the --allow-unrelated each time. And it was copying in the entire remote history each time. But this only seemed to happen if I initialized gitflow after having done the initial time. See actual steps that caused this problem. This may not be the only possible reason, more testing was not done to disprove other solutions.

Discovered this by:

I also ended up in the problem situation after gitflow had been started, when I used the sync button in vscode. Didn’t do more testing to figure it out but noted so avoid ending up in that problem again or for later testing.