I'm using Visual Studio's Git integration to push my changes to https://dev.azure.com. Today I created a GitHub repo, and added my main changes as remote for my GitHub repo with these commands from Visual Studio Git root folder:
git remote add upstream https://github.com/user/repo
git push upstream master
Now I have copy of all my changes in GitHub. When I make new changes in Visual Studio and push them to https://dev.azure.com, I'd like those to be pushed to GitHub too. I heard about Git hooks. So I wrote this in post-receive
script:
#!/bin/sh
git push upstream master
exit 0
But when I pushed my changes from Visual Studio, my GitHub repo wasn't updated, so I had to do git push upstream master
manually.
What am I doing wrong?