devops

linux

#linux #incus #lxc

Install

Source code: https://github.com/zabbly/incus

Add repo key

mkdir -p /etc/apt/keyrings/
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc

Add remote repo

sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc

EOF'

Install

apt-get update && apt-get install incus

Add user to incus group

 sudo usermod -a -G incus <USERNAME>
 sudo usermod -a -G incus-admin <USERNAME>

And re-login


First time config

Как копировать коммиты из одного Git repo to в другой?

#git #linux

Клонируем основное репо и заходим в него

git clone https://github.com/user1/project1
cd project1

Добавляем репо из которого нужно скопировать коммиты

git remote add oldrepo https://github.com/user1/project2

Обновляемся

git remote update

Тут можно посмотреть что и как получилось

git log --all --oneline --graph --decorate 

Находим нужные коммиты и делаем cherry-pick из старого в новое репо

git cherry-pick sha-of-commit-one
git cherry-pick sha-of-commit-two
git cherry-pick sha-of-commit-three

Могут и будут возникать конфликты и их нужно будет разруливать Проверяем что все ок

git log

И пушим в основное репо

git push origin master

Удаляем старое

git remote remove oldrepo