Difference between revisions of "Git admin"

From PyMOLWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
== Useful commands ==
 
== Useful commands ==
 +
Make a remote for the official repository
 +
git remote                                                                                                  # To see your defined alias for remotes
 +
<nowiki>git remote add pymol https://GIT_USER_NAME@github.com/Pymol-Scripts/Pymol-script-repo.git</nowiki> 
 +
 +
When a user make a Pull request
 +
git fetch <nowiki>https://github.com/GIT_USER_NAME/Pymol-script-repo master</nowiki>                        # Get from the alias pymol, the official repository
 +
git log pymol/master ^master                                                                                # See the log message
 +
git checkout pymol/master                                                                                  # Checkout the changes, try the script
 +
git checkout master                                                                                        # Go back to master
 +
git merge pymol/master                                                                                      # Merge in, and you are ready
 +
 +
 +
 
Make a zip file of the scripts, to add to the download page at Github
 
Make a zip file of the scripts, to add to the download page at Github
 
  git archive --format zip --output ./zip_archives/Pymol-script-repo_DATE.zip master
 
  git archive --format zip --output ./zip_archives/Pymol-script-repo_DATE.zip master

Revision as of 07:24, 3 December 2011

Useful commands

Make a remote for the official repository

git remote                                                                                                  # To see your defined alias for remotes
git remote add pymol https://GIT_USER_NAME@github.com/Pymol-Scripts/Pymol-script-repo.git  

When a user make a Pull request

git fetch https://github.com/GIT_USER_NAME/Pymol-script-repo master                        # Get from the alias pymol, the official repository
git log pymol/master ^master                                                                                # See the log message
git checkout pymol/master                                                                                   # Checkout the changes, try the script
git checkout master                                                                                         # Go back to master
git merge pymol/master                                                                                      # Merge in, and you are ready


Make a zip file of the scripts, to add to the download page at Github

git archive --format zip --output ./zip_archives/Pymol-script-repo_DATE.zip master

Additional reading

For more commands on git, look here: http://cheat.errtheblog.com/s/git