Is it possible for me to push a commit from one Git repository into a branch of another Git repository?
So for example, I have a commit aaaa
in Repository A. Commit aaaa
is in a branch called "Testing". I want to push commit aaaa
into a branch called "Stable" which is in another repository called Repository B. When pushed into Repository B from A, the new commit to Repository B should be an exact image of commit aaaa
, ie, replacing all of the files in the branch "Stable" in Repository B with the ones from A.
If this is possible, how can I do it?
Try this:
git push repositoryb aaaa:Stable
I am assuming repositoryb
is a remote pointing to the other repo. And if you haven't come to grips with git, the above pushes the commits upto aaaa
and not just aaaa
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With