[Moller_simulation] [EXTERNAL] Re: Remoll repository: forking now encouraged
Wouter Deconinck
wouter.deconinck at umanitoba.ca
Fri Mar 19 11:52:16 EDT 2021
Hi everyone,
One more additional comment to the forking workflow instructions sent
earlier.
If you create a fork, that will copy all branches in the original
repository. If you attempt to checkout a branch that exists on both the
origin and upstream repository, git will be confused about which one you
actually want. To make this clear, you will need to be a bit more specific
in the checkout command:
git checkout --track upstream/develop
or
git checkout --track origin/develop
The first version will make sure your local develop branch follows the
upstream version. In the second case, it will follow the origin version
(your forked version).
I'm working on assembling these instructions in a single standard file in
the remoll repository (CONTRIBUTING.md), see
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_remoll_pull_446&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=PWm75VMzrs3IqrbcSSqAHXiFgjUzHrZhd45JDd3PCLU&e= . Comments there are welcome.
Cheers,
Wouter
On Mon, Mar 8, 2021 at 9:16 PM Wouter Deconinck <
wouter.deconinck at umanitoba.ca> wrote:
> Hi everyone,
>
> I'm just following up with some info for those who already have a
> perfectly fine local working copy and don't want to clone all over again
> into a new directory.
>
> Cheers,
> Wouter
>
> *Renaming an existing remote*:
> After creating a fork as before, you will need to add this fork as the
> primary remote (origin) of your local copy.
> - Rename the previous remote (jeffersonlab/remoll):
> git remote rename origin upstream
> - Add your forked repository as a new remote:
> git remote add origin git at github.com:USERNAME/remoll.git
>
>
>
> On Mon, Mar 8, 2021 at 4:59 PM Wouter Deconinck <
> wouter.deconinck at umanitoba.ca> wrote:
>
>> Hi everyone,
>>
>> I am writing with a change to how we have been using the remoll
>> repository. We will be moving to a *forking workflow*. Details below.
>>
>> Cheers,
>> Wouter
>>
>>
>> *Summary*: Until now, we mainly have been using branches in the
>> jeffersonlab/remoll repository on github. Instead of creating branches
>> there, we will now encourage you to *fork* the remoll repository and
>> create branches in your own repository. From those branches, you are
>> encouraged to submit a *pull request* to the jeffersonlab/remoll
>> repository for merging.
>>
>> *Rationale*: JLab is preferring the forking workflow for users who
>> contribute to a few repositories only. Membership in the jeffersonlab
>> organization is reserved for maintainers (and has additional requirements
>> since these accounts are publicly affiliated with JLab; i.e. real name and
>> institutional affiliation in your github profile). Moreover, we have enough
>> contributors now and this workflow scales better.
>>
>> *Creating a fork*: Click the 'fork' button on the top right of the
>> remoll repository. You can now clone this repository:
>> git clone git at github.com:USERNAME/remoll.git
>> This will fork all current branches in the jeffersonlab/remoll repository.
>>
>> *Keeping your fork up to date*:
>> - Add the upstream repository jeffersonlab/remoll to your list of
>> remotes (you only need to do this once):
>> git remote add upstream https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jeffersonlab_remoll.git&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=TuSFK5eJjVeJ9lhzL4S324Lc6U9pZhplYfoYOwQzsHY&e=
>> - Whenever you want to update, fetch the latest upstream changes:
>> git fetch upstream
>> Variant: git fetch --all
>> - ... and merge the upstream branch in your branch, e.g. for the
>> 'develop' branch
>> git checkout develop
>> git merge upstream/develop
>> Avoid making changes directly on master or develop, even in your own
>> repository (for the same reasons).
>>
>> *Doing your work*:
>> It is easiest to do your work in branches, one per logically separate
>> tasks, and to merge those to jeffersonlab/remoll frequently.
>> - Create a new branch from the develop branch (the base of your branch):
>> git checkout develop
>> git branch new-feature-xyz
>> git checkout new-feature-xyz
>> - Now, you can do your work in this branch.
>> - Periodically, push the changes to your repository:
>> git push
>>
>> *Cleaning up your work*:
>> Before contributing your changes back to jeffersonlab/remoll for others
>> to use, it make sense to clean up some.
>> - Make sure your branch works with the most up to date code in the
>> upstream base branch:
>> git fetch upstream
>> git checkout develop
>> git merge upstream/develop
>> - Rebase your branch to point to the most recent code in the base branch:
>> git checkout new-feature-xyz
>> git rebase develop
>> The rebase phase is when you may need to resolve some conflicts: when you
>> have modified lines that someone else has modified upstream as well. Ask in
>> Slack if you need help resolving conflicts (in git; we can't help with the
>> neighbors).
>>
>> *Submitting a pull request*:
>> When you are done with your work in a branch and ready to share it with
>> others, go to your branch page on GitHub and click the 'pull request'
>> button. Write a clear summary and wait for someone to merge it (or request
>> some changes, if necessary). After your branch has been merged, you can go
>> ahead and delete it. When you update your develop branch, the changes
>> will be included.
>>
>>
>
> --
> Wouter Deconinck (he/him/his) 🕪
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.name-2Dcoach.com_wouter-2Ddeconinck&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=bR8aOlpYN5X5W751GzuaEuluNzjydoAkcV1O7xJdQF4&e= >
> Associate Professor of Physics, University of Manitoba
> Office: 204 Allen / JLab CC F345, Phone: (204) 474-6206
> Zoom meeting room: https://urldefense.proofpoint.com/v2/url?u=https-3A__zoom.us_j_7579272413&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=g_eR35e3EDtCVEg3-L7UeYbgolFuMi3_XvWugayBzLU&e= R3G2G6
> Science makerspace consultation needed? Fill out the intake form
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.sci.umanitoba.ca_physics-2Dastronomy_resources_faculty-2Dof-2Dscience-2Dmaker-2Dspace_maker-2Dspace-2Dfabrication-2Dconsultation-2Drequest_&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=0-uC_fI97AYsIRbOWV9fCYR7EW_XSKHzV6_tb_9IH8Q&e= >
> Watch my August 2019 APS webinar on agile in physics education
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.aps.org_careers_guidance_webinars_agile.cfm&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=ZFv3cOKLpPZuE9LZrgnGlxLNh240nUKpSqH4AyvsnpU&e= >!
>
>
--
Wouter Deconinck (he/him/his) 🕪
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.name-2Dcoach.com_wouter-2Ddeconinck&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=bR8aOlpYN5X5W751GzuaEuluNzjydoAkcV1O7xJdQF4&e= >
Associate Professor of Physics, University of Manitoba
Office: 204 Allen / JLab CC F345, Phone: (204) 474-6206
Zoom meeting room: https://urldefense.proofpoint.com/v2/url?u=https-3A__zoom.us_j_7579272413&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=g_eR35e3EDtCVEg3-L7UeYbgolFuMi3_XvWugayBzLU&e= R3G2G6
Science makerspace consultation needed? Fill out the intake form
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.sci.umanitoba.ca_physics-2Dastronomy_resources_faculty-2Dof-2Dscience-2Dmaker-2Dspace_maker-2Dspace-2Dfabrication-2Dconsultation-2Drequest_&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=0-uC_fI97AYsIRbOWV9fCYR7EW_XSKHzV6_tb_9IH8Q&e= >
Watch my August 2019 APS webinar on agile in physics education
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.aps.org_careers_guidance_webinars_agile.cfm&d=DwIFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=hK0qfHtfdwUHlZG0DnK-QRJVYus_TzTB8u52ev2QBtI&m=U2Z4HHD6eb4FyoW1u8llBp9UKxEYRlDdoMRooEu5Cck&s=ZFv3cOKLpPZuE9LZrgnGlxLNh240nUKpSqH4AyvsnpU&e= >!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/moller_simulation/attachments/20210319/c52c7d2b/attachment-0001.html>
More information about the Moller_simulation
mailing list