Assume I clone a repository OSS
at version 1.0 containing a class A
. Subclassing A
is not enough for me, so I copy A
to A'
and make some modifications to it. At a later point in time, I clone OSS
at version 1.1
, containing an updated version of A
. How can I merge the changes/updates from A
to my modified copy A'
? Is there a standard pattern for such cases?
Under your repository name, click Settings. Under "Danger Zone", to the right of to "Change repository visibility", click Change visibility. Select a visibility. To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of.
You might as well want to merge every new commit on the public branch to your private branch. This situation happens mostly when you are creating a public repository but also want to use it for your private project. Sadly, GitHub did not allow a private branch on a public repository.
You can now set your repository to any available visibility option – public, private, or internal – from a single dialog in the repository's settings.
The idea is to:
create the patch using git diff
: between A#1.0 and 1#1.0
git diff 1.0 1.1 -- A > a.patch
then apply that patch using the patch
utility: you can specify the file you want to apply the diff to with patch
.
patch -p1 A' a.patch
On Windows, use a simplified PATH as in here, and you will see patch available:
C:\git\>where patch
C:\prgs\gits\current\usr\bin\patch.exe
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