Ответ 1
Вы должны вытащить коммиты из одного репозитория в другой, выполнить слияние, а затем вернуться к первому (если вы хотите, чтобы оба хранилища содержали все коммиты).
# switch to repo A
cd folder_a
# Add repo B as a remote repository
git remote add folderb /path/to/folder_b
# Pull B master branch into a local branch named 'b'
git pull folderb master:b
# Merge b into A master branch
git merge b
# Switch to repo B
cd ../folder_b
# Add repo A as a remote repository
git remote add foldera /path/to/folder_a
# Pull the resulting branch into repo B master branch
git pull foldera master:master