Small Github tutorial

Hi all,

Please find attached a tarball with a simple HTML document and some images that explain how to fork the LAMMPS repository on GitHub, how to modify it and how to file pull requests. Maybe useful for somewhere on the website (contribute.html or something)?

Cheers,

Stefan

lammps_github_tutorial.tar.gz (865 KB)

Hi all,

Please find attached a tarball with a simple HTML document and some images
that explain how to fork the LAMMPS repository on GitHub, how to modify it
and how to file pull requests. Maybe useful for somewhere on the website
(contribute.html or something)?

thanks for the effort. where this would end up depends on steve.

however, i have one suggestion for an improvement. i would highly
recommend to create a "feature branch" for each contribution and then
create the pull request from this branch. this will make it easier and
cleaner to amend the pull request and also to have multiple sets of
features and thus separate pull requests going at the same time. using
feature branches, is a recommended software engineering practice when
using a source management tool, anyway.

thanks,
    axel.

Send me a final version of the content for this and
we can add it to the manual at the end of Section
modify where it discusses how to contribute code
to LAMMPS.

Thanks for working this up Stefan,
Steve

Hi Axel, good suggestion for the feature branch. To be honest I’ve never used git for any big projects so I always assumed there was a better way of doing it but I never figured out how. I will add it, once I figure out how it works. =)

Hi Axel, good suggestion for the feature branch. To be honest I've never
used git for any big projects so I always assumed there was a better way of
doing it but I never figured out how. I will add it, once I figure out how
it works. =)

we can can practice this with your currently pending pull request (#34).
for starters, just check out the local branch of what you submitted as
a pull request and do:

git checkout -b add-user-manifold

push this branch to your github repo. then cancel your previous pull
request and submit a new one based on this branch.

i will ask you to make some changes and update the pull request accordingly.
for that you would then create another feature branch from
add-user-manifold, lets call it axel-requests, implement those
changes, test them, switch back to the unmodified branch for
comparison testing, if needed, merge in the axel-requests branch and
then push the add-user-manifold branch again, which should then
automatically update the pull request.

this should be the standard workflow for pull requests. you can easily
see that you can create one feature branch for each individual feature
that you plan to submit (you don't have to worry about updating to the
latest LAMMPS or LAMMPS-ICMS updates as that will be taken care of
automatically on my side) and work on each of them concurrently by
checking out the relevant branch and committing changes to that
branch, including requested updates.

in this particular case, we may need to go one step further and i'll
have to make changes as well and actually submit a pull request to
your fork, so you can validate some modifications that i would prefer
to be done and tested before i forward the package to steve. but let
us worry about that when it is the time for that.

if you have any more questions about this git stuff as far as it
pertains to getting your work smoothly integrated into LAMMPS, you may
also contact me off-list. ...that is unless there are requests from
people on the list that would like to see this process in all gory
details to learn from it, of course.

axel.