Howto contribute to the Pymol script repo - AthiraDK/Pymol-script-repo GitHub Wiki

This HowTo applies mainly to UNIX based OS, because I have no knowledge about the tools one has to use on windows.

First of all be sure you have installed git. I prefer to use a shell for managing the repo, but don’t be scared, it isn’t that difficult to learn.

For everyone used to use subversion, here are the differences in the commands: svn2git course.

First of all we have to setup some basic things. therefor we open a shell and type following things

git config –global user.name Justin Lecher git config –global user.email [email protected] git config –global color.ui auto git config –global color.pager auto git config –global color.branch auto git config –global color.status auto

Then you need an account at github.com. During registration you will be asked to deposit your public ssh key (be sure that it is really your public one). With this you gain access to every public repo on GitHub.

Once you have an account you can checkout the repo via

git clone [email protected]:jlec/Pymol-script-repo.git

We can now add a new script. Just write it in your favourite editor and save it inside the appropriate category in the checked out repo. Now change back into the shell and into the categories subdir. If you now type

git status

All changes, which have been made after the last commit are shown. We now see our script under untracked files. So let’s add the new script to the repo:

git add MYSCRIPT

If we check the status again, we see it at “Changes to be committed”. Okay then do it

git commit

This will open editor where you have to type your commit message, which can be multiline.

MYSCRIPT added See http://pymolwiki.org/index.php/MYSCRIPT for details of usage

All subversion user now have to keep attention, git not commits into the remote repo, but into a local one. Our commit is still onto our box. Sending it to the remote repo in our case onto the Github is done via the push command

git push

Now you can visit the commit page and see your commit log entry. You have successfully pushed your script into the Git hub.

If you want to update you repo, to get the changes other user had made, do

git pull —rebase

The rebase will take care, that the changes you have are the latest and not mixed with the pulled changes.

Now we like to update our script, so open it again in the editor of your choice and change what has to be changed. After that we can do a

git status

We now see the script at “Changed but not updated”. Lets see what are the differences to what was there before

git diff MYSCRIPT

Okay this was our change, so we add, commit and push it again

git add git commit git push
⚠️ **GitHub.com Fallback** ⚠️