This is a read-only mirror of pymolwiki.org

Difference between revisions of "Git admin"

From PyMOL Wiki
Jump to navigation Jump to search
m (15 revisions)
 
(5 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
  <nowiki>git remote add pymol https://GIT_USER_NAME@github.com/Pymol-Scripts/Pymol-script-repo.git</nowiki>   
 
  <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
+
When a user make a Pull request, read more here http://help.github.com/send-pull-requests/
  git fetch <nowiki>https://github.com/GIT_USER_NAME/Pymol-script-repo master</nowiki>                       
+
  git fetch <nowiki>https://github.com/OTHER_GIT_USER_NAME/Pymol-script-repo master</nowiki>                       
 
  git log GIT_USER_NAME/master ^master                                                                               
 
  git log GIT_USER_NAME/master ^master                                                                               
 
  git checkout GIT_USER_NAME/master                                                                          # Checkout the changes, try the script. See wikipage
 
  git checkout GIT_USER_NAME/master                                                                          # Checkout the changes, try the script. See wikipage
Line 12: Line 12:
 
  git checkout master                                                                                        # Go back to master
 
  git checkout master                                                                                        # Go back to master
 
  git merge GIT_USER_NAME/master                                                                              # Merge in, and you are ready
 
  git merge GIT_USER_NAME/master                                                                              # Merge in, and you are ready
  git push pymol master
+
  git push pymol master                                                                                       # If you are out of date, continue
  git fetch pymol master                                                                                      # If you are out of date
+
  git fetch pymol master                                                                                      # Get latest from the official rep
   
+
git branch -a                                                                                              # See all branches
 +
git merge pymol/master                                                                                      # Merge remote branch into yours
 +
  git push pymol master                                                                                      # Push to the original repository
  
Make a zip file of the scripts, to add to the download page at Github
+
== Zip files ==
 +
One can make a zip file of the scripts.
 
  git archive --format zip --output ./Pymol-script-repo.zip master
 
  git archive --format zip --output ./Pymol-script-repo.zip master
  
 
== Additional reading ==
 
== Additional reading ==
 
For more commands on git, look here: http://cheat.errtheblog.com/s/git
 
For more commands on git, look here: http://cheat.errtheblog.com/s/git

Latest revision as of 01:47, 28 March 2014

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, read more here http://help.github.com/send-pull-requests/

git fetch https://github.com/OTHER_GIT_USER_NAME/Pymol-script-repo master                       
git log GIT_USER_NAME/master ^master                                                                               
git checkout GIT_USER_NAME/master                                                                           # Checkout the changes, try the script. See wikipage

Push the change to the Official repository

git checkout master                                                                                         # Go back to master
git merge GIT_USER_NAME/master                                                                              # Merge in, and you are ready
git push pymol master                                                                                       # If you are out of date, continue
git fetch pymol master                                                                                      # Get latest from the official rep
git branch -a                                                                                               # See all branches
git merge pymol/master                                                                                      # Merge remote branch into yours
git push pymol master                                                                                       # Push to the original repository

Zip files

One can make a zip file of the scripts.

git archive --format zip --output ./Pymol-script-repo.zip master

Additional reading

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