Then for subsequent commits:

> git remote add myfork https://github.com/username/ProjectName.jl.git  # you 
> only need to do this once
Everytime I want to push new changes to the pull request:

> git push myfork branch-name:pull-request/2c9f2b3f   # 2c9... taken from the 
> pull request page


?

Cédric

On Thursday, November 26, 2015 at 6:45:39 AM UTC-5, Tim Holy wrote:
>
> An an executive summary here (will presumably be backported for 0.4.2): 
> http://docs.julialang.org/en/latest/manual/packages/#executive-summary 
>
> --Tim 
>
> On Thursday, November 26, 2015 02:49:49 AM Avik Sengupta wrote: 
> > The best practices are documented 
> > here: 
> http://docs.julialang.org/en/release-0.4/manual/packages/#code-changes 
> > 
> > In summary, it is best to use your third approach. Pkg.submit() will 
> fork 
> > the github repo into your account. And Pkg.free() will get you back to 
> the 
> > released state of the package, which makes it safe to do the changes in 
> > place, within .julia. 
> > 
> > Regards 
> > - 
> > Avik 
> > 
> > On Thursday, 26 November 2015 07:04:51 UTC, Eric Forgy wrote: 
> > > I'm still learning the ropes. 
> > > 
> > > When I "Pkg.add" a Julia package, it produces a git repo in .julia. If 
> I 
> > > wanted to revise one of the packages, is it unadvised to modify it 
> > > directly 
> > > in the .julia repo if I ultimately intend to submit a PR? 
> > > 
> > > My first instinct was to clone the package somewhere other than .julia 
> and 
> > > then "Pkg.clone" from there, but that seems a bit roundabout. Hence my 
> > > question. 
> > > 
> > > I tried the following which doesn't seem optimal: 
> > >    1. Fork the package on GitHub 
> > >    2. "git clone" the package somewhere other than .julia 
> > >    3. Pkg.clone from my local cloned repo (had problems with this 
> because 
> > >    the package was already in .julia so deleted it first) 
> > >    4. Modify the package, commit and then Pkg.checkout 
> > >    5. Repeat step 3. until revision does what I want it to do 
> > >     
> > >       - Steps 3. and 4. got me a LONG list of commits, so I introduced 
> > >       myself to "git rebase" with disastrous results. 
> > >       6. Tried deleting the package from .julia so I could start over 
> > >     
> > >    again with "Pkg.add", but Pkg seemed to have gotten confused from 
> my 
> > >    shenanigans and says the package could not be found. 
> > >    7. Delete the Julia installation. Delete .julia and start again. 
> > > 
> > > Disaster :) 
> > > 
> > > My next attempt will be along these lines: 
> > >    1. Fork the package on GitHub 
> > >    2. Pkg.clone from my forked repo 
> > >    3. Modify the package directly from the .julia folder (hoping this 
> > >    will avoid a ton of commits) 
> > >    4. When everything works, commit and push to my forked repo on 
> GitHub 
> > >    5. Submit a PR from GitHub 
> > > 
> > > How does that sound? Any better suggestions? 
> > > 
> > > Just before submitting this question, a possibly better solution 
> dawned on 
> > > me. Since I have already "Pkg.add"ed the package, a git repo is 
> already in 
> > > 
> > > .julia so I might try: 
> > >    1. Fork the package on GitHub 
> > >    2. Modify the package already inside .julia 
> > >    3. Add my fork as a remote repo 
> > >    4. When everything works, commit and push to my forked remote repo 
> on 
> > >    GitHub 
> > >    5. Submit a PR from GitHub 
> > > 
> > > How does that sound? What do others do? 
> > > 
> > > Note: The package I'm trying to modify is pure Julia so does not 
> require 
> > > any compiler. 
>
>

Reply via email to