I have an ADO repository and a GitHub repository. Both repositories have a 'master' branch with the same commit history. When I complete a Pull Request from any branch to 'master' branch and add a new commit to 'master' branch in ADO repository, I have to add the same commit to the GitHub repository and vice-versa so that commit history will remain the same. Is that possible? Please provide an example.
UPDATE:
I have tried the suggested solution:
git clone https://msit.visualstudio.com/<org>/_git/<repo-name>
git config --global user.name "abc@xyz.com"
git config --global user.name "ABC DEF"
git checkout master
git add .
git commit -m "abc"
git push https://github.com/xyz/project.git
On trying the same, I get teh following error:
fatal: Cannot prompt because user interactivity has been disabled.
fatal: could not read Username for 'https://msit.visualstudio.com': terminal prompts disabled
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.