On Fri, 2016-06-03 at 08:45, Chris Rackauckas <[email protected]> wrote:
> I can keep a private local branch, but then it's only on one computer and I
> can't develop/test on any other computer (/hpc).

You can have several remotes for one repository.  So you can have your
private branch on a different remote.  Easiest is to to just clone the
package on github and set that up as a remote.  If you need actual
privacy then you need to pay github to make the fork a private repo.
Alternatively use bitbucket.org to host it, they have free private
repos.

I think something like this should work with bitbucket (untested):

First, on bitbucket create a private repo.

git clone [email protected]:/xuser/YPgk.jl.git YPkg-myfork
cd YPkg-myfork

git remote rename origin upstream  # upstream is the traditional name

git remote add origin [email protected]:myusername/ypkg.git # origin is 
traditional for where you usually push to

git push orgin # puts the repo to bitbucket

I would then keep master in sync with upstream (git fetch upstream; git
rebase upstream master) and do my personal changes on a feature branch.

Once the time comes for a pull request, also fork the package repo on
github.  Add the github-fork as a remote:

git remote add github ...

git checkout my-feature-branch

git push github

Make PR on github.

I hope this helps.

> On Thursday, June 2, 2016 at 11:18:09 PM UTC-7, Mauro wrote:
>>
>> On Fri, 2016-06-03 at 07:58, Chris Rackauckas <[email protected]
>> <javascript:>> wrote:
>> > I think I will need both versions available, since the majority of the
>> work
>> > is public, while the private work will tend to sit around longer (i.e.
>> > waiting to hear back from reviewers). So I'd want to be able to easily
>> work
>> > with the public repository, but basically switch over to a private
>> branch
>> > every once in awhile.
>>
>> Well, then just checkout the branch you need at the time, easy.
>>
>> Alternatively, have two different folders for the two branches and set
>> the LOAD_PATH depending on what you want to do.  If the REQUIREments are
>> different, in particular, different versions, it might be more tricky.
>> I think then you'd need two ~/.julia/v0.* folders.
>>
>> > On Thursday, June 2, 2016 at 9:21:13 PM UTC-7, Curtis Vogt wrote:
>> >>
>> >> If you don't need to have both versions of the package available at the
>> >> same time then I would recommend using a single Git repo with multiple
>> >> remotes. With this setup you can push to your private remote for
>> >> experiments and later push to the public remote when your ready to
>> share
>> >> your work.
>> >>
>> >> Some reading material on Git remotes:
>> >> https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes
>> >>
>>

Reply via email to