169 похожих чатов

I have a problem with git's post-recieve hook; can anyone

help me?
basically I have an array of files; if any of those files have changed I want that hook to push those files to another repo.
no, I can't put up a mirror, since the two repos have two different codebases but share some files.
as of now we manually use a .bat script (guess how legacy this is :P), but I would like git to do that sync on push automatically. is it even achievable? I tried a script that:
instantiates the array
clones the two repos in $(mkemp -d)
for file in $FILES[@];do cp -f temp/repo1 temp/repo2; done
cd repo2; git add ./*; git commit -m 'autosync commit done on date +...'; git push
but it does not work; it says that repo2 is not a git directory
now, this solution is terrible, I know, so feel free to insult me for it, but can someone help me? I'm fairly experienced in bash scripts and git, but I have no idea on how to structure the post-recieve hook..

1 ответов

25 просмотров

brother, look into submodules and dependabot

Похожие вопросы

Обсуждают сегодня

Всем привет, на линуксе лучше на fasm или nasm учиться писать для начала ?
meszjol
14
Если у меня есть такой класс: Object = {} function Object:new(a_name, a_transform, a_color, a_mesh, a_material, a_shader, a_textures) local private = {} private.n...
Cuarno Vile
4
было так ;void set_http_ver(RESPD* ptr, char* version, uint32_t length) // example: 'RTSP/1.1 ' set_http_ver: mov eax, [esp + 4] mov ecx, [esp + 8] ...
Mixail Frolov
5
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
зачем же переименовывать ? чтобы кол-во участников возросло или вдруг IBM от этого снова на свифте начнет кодить ? Я не понимаю что страшного в том что свифт гавно, если это т...
Oleh Nerzh
10
А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
@MrMiscipitlick А можешь макрос написать, который будет вычислять смещение относительно переданных меток? Просто .label1-.label2, и вернуть значение.
КТ315
35
Evo 1.4.34 PHP 7.4 Все работало штатно. На ровном месте SimpleGallery начал выдавать ошибку Что может быть? Уже все переустановил по новой. Места хватает. Хостинг reg.ru
Paul Savchenkov
6
здравствуйте. совершаю вот такую вещь: strcpy(line, (char)current_number); где current number — неподписанный шорт, line — массив чаров. ругань следующая: main.c:29:30: error...
Roberto's Ширгозиев
13
юзеры Jetpack Compose тут?
Qtless Qtless
8
Карта сайта