I have a private repository mainly with markdown files. I would like to make one of these files public through a gist, and be able to push to the two remotes. Is that possible?
This is what I did (MWE) - assume repo and gist already exist and gist file is in the root of the repo, with same name shared_file.md
git clone <my-repo>
git add remote gist [email protected]:<gist-code>.git
git fetch gist
No errors/warnings so far.
Then I tried to edit shared_file.md locally and
git add shared_file.md
git commit -m "test"
git push -u gist main
What happens is that the file is (commited and) pushed to the repo remote and not to the Github gist.
I'm aware of the fact that it might not make sense, cause I feel I should ad least use another branch. Maybe it's not even possible to do. In that case, is there any way of achieving what stated in the beginning?
Thank you in advance.