Git forking: adding elements to my personal repository but not the original

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Git forking: adding elements to my personal repository but not the original

Jason Hsu, Ruby on High Speed Rails
As you know, a way to contribute to a project without being a collaborator is to fork a project, create a branch, make the changes in your new branch, and submit the new branch as a pull request.

There are certain things I'd like to add to a project (like Bash scripts and the annotate, rails-erd, and railroady gems), but the project collaborators don't want them.  I understand now that they don't expect me to suck it up and do things their way.  Instead, they want me to keep those features on just my own personal branch but push other changes.

How do I go about doing this?  Do I make the changes to my personal fork's master branch or a different branch?  When the upstream repository is updated, how do I update my personal branch to incorporate these changes WITHOUT wiping out my personal features?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dd563618-24c8-408c-b0aa-12a41f50bdf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Git forking: adding elements to my personal repository but not the original

Colin Law
On Tue, 28 Aug 2018 at 16:10, Jason Hsu, Ruby on High Speed Rails
<[hidden email]> wrote:
>
> As you know, a way to contribute to a project without being a collaborator is to fork a project, create a branch, make the changes in your new branch, and submit the new branch as a pull request.
>
> There are certain things I'd like to add to a project (like Bash scripts and the annotate, rails-erd, and railroady gems), but the project collaborators don't want them.  I understand now that they don't expect me to suck it up and do things their way.  Instead, they want me to keep those features on just my own personal branch but push other changes.
>
> How do I go about doing this?  Do I make the changes to my personal fork's master branch or a different branch?  When the upstream repository is updated, how do I update my personal branch to incorporate these changes WITHOUT wiping out my personal features?

The technique I use is to make my personal changes on a branch.  Then
when the master is updated you can rebase the branch onto the tip of
master.

Colin

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dd563618-24c8-408c-b0aa-12a41f50bdf5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv%2Ba%2B0No2iRBjFJrBtbau%3DiaF04yAuU31XNLYvZ_UM%2BcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Git forking: adding elements to my personal repository but not the original

Jason Hsu, Ruby on High Speed Rails
In reply to this post by Jason Hsu, Ruby on High Speed Rails
Let's say that the project I'd like to work on is other_user/project1.  I clone this project, and my version is myself1/project1.  How do I proceed?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3d9a72df-4230-4f5b-af17-50d571f4ae6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Git forking: adding elements to my personal repository but not the original

Colin Law
Exactly how you do it depends on where the repository is.  Are we
talking github?
Which bit don't you know how to do?  If it is basic git operation help
you need then there are many tutorials out there.

Colin
On Tue, 28 Aug 2018 at 17:09, Jason Hsu, Ruby on High Speed Rails
<[hidden email]> wrote:
>
> Let's say that the project I'd like to work on is other_user/project1.  I clone this project, and my version is myself1/project1.  How do I proceed?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3d9a72df-4230-4f5b-af17-50d571f4ae6f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLus%2BPcG8PrzURN_GURGRfCBriFeNcz-6BOsejqY_sGtvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Git forking: adding elements to my personal repository but not the original

Jason Hsu, Ruby on High Speed Rails
Yes, I'm talking about GitHub.  I know how to fork a project.  I can create a new branch and then submit the branch as a pull request.

What I'm not clear on is how to add elements to the project (like the Bash scripts and Ruby gems) to my version of the project, submit a pull request that omits these particular personal elements, and update my version of the project from the original WITHOUT losing my personal elements.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/35b9e2ab-f9e1-499a-b895-31dc708d1183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Git forking: adding elements to my personal repository but not the original

Colin Law
On Tue, 28 Aug 2018 at 17:29, Jason Hsu, Ruby on High Speed Rails
<[hidden email]> wrote:
>
> Yes, I'm talking about GitHub.  I know how to fork a project.  I can create a new branch and then submit the branch as a pull request.
>
> What I'm not clear on is how to add elements to the project (like the Bash scripts and Ruby gems) to my version of the project, submit a pull request that omits these particular personal elements, and update my version of the project from the original WITHOUT losing my personal elements.

OK, create your working branch and add your personal bits.  You will
never issue a PR using that branch.
To update your repository when there are changes in the original see
https://help.github.com/articles/syncing-a-fork/
Then with your branch checked out you can do
git rebase master
to move your bits to the tip of master.  Obviously if the working
branch on the main repo is not master then rebase to that.
It gets a bit fiddly if you want to issue a PR, I have done this by
starting a new branch on my personal branch and making the changes
there. Once that is all working rebase that branch onto master so you
can issue the PR.

Colin

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/35b9e2ab-f9e1-499a-b895-31dc708d1183%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu6d6KAz5M89qq%3Dn9WyRkim84XK69hktRU7XCt%2BdOLrdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.