Hi Ravi,

I'm not 100% sure what you're looking for but after applying the updates you 
could use "git add -i" to stage only the changes you're interested in, then 
checkout the file to restore any changes you have made and want to keep.

  https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging

Does that come close to what you're after?

C
--
Barking Iguana Ltd. is a company registered in England and Wales. Registered 
number: 08915147. Registered address: Jubilee House, East Beach, Lytham, St. 
Annes, Lancashire, England, FY8 5FT.

> On 18 Aug 2016, at 03:37, Ravi (Tom) Hale <[email protected]> wrote:
> 
> Hi Nige,
> 
> In this case as it was a bugfix only, and I was already on 5.0.0, I just did 
> a `bundle update`.
> 
> However, I was wondering about the case of major or minor updates.
> 
> http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html says to run:
>   rails app:update task
> 
> This is where I have issues with whole files being clobbered.
> 
> Even with the 'd' option to see a diff, there's no auto way to apply it. 
> Surely those who have gone through many major/minor updates have got jack of 
> this and worked out a more automated solution...
> 
> Is there a smart way to patch rather than replace whole files?
> 
> Tom
> 
> 
>> On 2016-08-14 15:27, Nigel Sheridan-Smith wrote:
>> Hi Tom,
>> 
>> Can't you just do a "bundle update"? What version are you on? 4.1 and
>> below? There was some discussion on the Ruby AU Slack about people who
>> have backported the changes to earlier versions.
>> 
>> Cheers,
>> Nigel
>> 
>> *Dr Nigel Sheridan-Smith PhD* / Principal
>> *Green Shores Digital*
>> 
>> Twitter  <https://twitter.com/GreenShoresAU>Linkedin
>> <http://au.linkedin.com/in/nsheridansmith>
>> 
>>    *M*: +61 403 930 963
>>    *E*: [email protected]
>>    <mailto:[email protected]>*W*: 
>> http://www.greenshoresdigital.com
>>    <http://www.greenshoresdigital.com/>
>> 
>> 
>> 
>> 
>> 
>> On Sun, Aug 14, 2016 at 5:56 PM, Tom Hale <[email protected]
>> <mailto:[email protected]>> wrote:
>> 
>>    Is there a way to have any changes to the default files patched on,
>>    instead of the new files clobbering the entire existing files?
>> 
>>    I'm envisaging a git branch for just the default files, upgrading,
>>    generating a patch and applying to master... or is there a better way?
>> 
>>    Tom
>> 
>>    On 2016-08-12 14:47, John Sherwood wrote:
>> 
>> 
>>        
>> http://weblog.rubyonrails.org/2016/8/11/Rails-5-0-0-1-4-2-7-2-and-3-2-22-3-have-been-released/
>>        
>> <http://weblog.rubyonrails.org/2016/8/11/Rails-5-0-0-1-4-2-7-2-and-3-2-22-3-have-been-released/>
>> 
>>        --
>>        You received this message because you are subscribed to the Google
>>        Groups "Ruby or Rails Oceania" group.
>>        To unsubscribe from this group and stop receiving emails from
>>        it, send
>>        an email to [email protected]
>>        <mailto:rails-oceania%[email protected]>
>>        <mailto:[email protected]
>>        <mailto:rails-oceania%[email protected]>>.
>>        To post to this group, send email to
>>        [email protected]
>>        <mailto:[email protected]>
>>        <mailto:[email protected]
>>        <mailto:[email protected]>>.
>>        Visit this group at
>>        https://groups.google.com/group/rails-oceania
>>        <https://groups.google.com/group/rails-oceania>.
>>        For more options, visit https://groups.google.com/d/optout
>>        <https://groups.google.com/d/optout>.
>> 
>> 
>>    --
>>    You received this message because you are subscribed to the Google
>>    Groups "Ruby or Rails Oceania" group.
>>    To unsubscribe from this group and stop receiving emails from it,
>>    send an email to [email protected]
>>    <mailto:rails-oceania%[email protected]>.
>>    To post to this group, send email to [email protected]
>>    <mailto:[email protected]>.
>>    Visit this group at https://groups.google.com/group/rails-oceania
>>    <https://groups.google.com/group/rails-oceania>.
>>    For more options, visit https://groups.google.com/d/optout
>>    <https://groups.google.com/d/optout>.
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Ruby or Rails Oceania" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to [email protected]
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected]
>> <mailto:[email protected]>.
>> Visit this group at https://groups.google.com/group/rails-oceania.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/rails-oceania.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

Reply via email to