1. Briefly
I don't find, how I can quick add, commit and push changes to 2 GitHub repositories both, that I don't need add, commit and push change to 2 GitHub repositories separately each time.
2. Example workspace
Local workspace:
SashaSource
    .git
    SashaSourceSubfolder1
    SashaSourceSubfolder2
    SashaOutput.github.io
        .git
        index.html
        SashaAnother.html
I have 2 remote GitHub repositories:
- SashaSource— for- SashaSourcelocal directory;
- SashaOutput.github.io— for- SashaOutput.github.iolocal directory, location of my GitHub Pages site.
I use Pelican static site generator. I make a changes in SashaSourceSubfolder1 or SashaSourceSubfolder2 folder → I make a build (use make, fabric tools or pelican content command) → I get output in SashaOutput.github.io folder. (I set Pelican, that SashaOutput.github.io/.git folder don't change, if I make a build).
Now I want to push my changes to SashaSource and SashaOutput.github.io remote repositories.
3. Actual behavior
I need to run
git add . && git commit -m "Example commit description" && git push
in SashaSource repository than I need to run same command to SashaOutput.github.io repository.
4. Expected behavior
I print in terminal any command → git push changes to SashaSource and SashaOutput.github.io remote repositories both with a same commit description, that user don't need to run same command 2 times each time.
5. Not helped
- I read about git submodules, but I don't find, how I can solve my problem.
- I find, how I can push changes to 2 remote repositories. I set - git remote→- git add . && git commit -m "Example commit description"→ I get output:- D:\SashaSource\>git push all To https://github.com/Kristinita/SashaOutput.github.io.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/Kristinita/SashaOutput.github.io.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull …') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 770 bytes | 0 bytes/s, done. Total 4 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3), completed with 3 local objects. To https://github.com/Kristinita/SashaSource dc36727..3e5d63b master -> master- My changes push to 1 remote repository. I think, that I need add and commit changes to - SashaOutput.github.iobefore push, but I don't find, how I can do it.
- I read another Stack Overflow questions about push to 2 or more repositories, but I don't find in it, how user can add and commit changes to 2 repositories both. 
- I don't understand, how I can to write script for expected behavior in my Windows. Commit description — is a variable, how I can use it in script? 
6. Do not offer
- I need separate repository for my output SashaOutput.github.io, because GitHub Pages don't support source for Pelican and needs to be output directory in root of repository. Please, do not offer use 1 remote GitHub repository for my site, not 2.
- Please, do not offer, that I need to use Jekyll.
7. Environment
Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
git:
version 2.12.0.windows.1
 
    