1 / 15

Quick Guide To Git & Wiki

Quick Guide To Git & Wiki. Why We Need Version Control. Group projects Prevents loss of code when trying to merge versions Allows Individual projects Create a branch during debugging to keep track of changes and avoid accidental introduction of errors

maine
Download Presentation

Quick Guide To Git & Wiki

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Quick Guide To Git & Wiki

  2. Why We Need Version Control • Group projects • Prevents loss of code when trying to merge versions • Allows • Individual projects • Create a branch during debugging to keep track of changes and avoid accidental introduction of errors • Defines a central version of the code when working in multiple locations

  3. Installing it on your Mac • If you have Snow Leopard or Lion (10.6 or newer): • http://git-scm.com/ • If you have Mac OS 10.5 or older: • http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.5.4-i386-leopard.dmg&can=2http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.5.4-x86_64-leopard.dmg&can=2 • Check your hardware: second link requires 64-bit chip

  4. How the Git Server Works Initialize Main Branch Commit Clone Stage Working Directory A Edit

  5. How the Git Server Works Initialize Main Branch Commit Clone Commit Error: Version Conflict Stage Working Directory A Edit Pull Stage Stage Merge Clone Working Directory B Edit

  6. Initializing a Git Repository • Init • Creates a /.git object in the current directory • To create a shared git • git init –shared foo.git • chgrp –R groupnamefoo.git • Add • This does not commit the files to the git, just adds files to the list of tracked objects • Standard Linux trick apply, e.g. git add *.py will add all Python files in the current directory • Push • Used to import an old repository into a new one

  7. Global Configuration Steps • Set your name and email for the tracking logs: • gitconfig –global user.name “Your Name” • gitconfig –global user.emailyou@example.com

  8. Getting Code from the Git Repo • Clone: git clone ssh://user@server:project.git • Unlike “checkout” used by other programs, creates a complete duplicate of the code • Easier for multiple people to work on the same file simultaneously • Pull • Allows you to look at someone else’s code without committing changes to the central version • For multiple users, copies any commits that have been made since you last cloned to your clone before you can merge back to the main branch EXAMPLE: git clone ssh://titicaca.engin.umich.edu/home/code/GAS.git

  9. Making Changes in the Git • Status • Checking which files have been modified/added • Identifies what’s been modified and staged • Staging • Branching • Creates new branch, great for debugging

  10. Committing to Change • Commiting • Initial commit defines the main branch of the code • git commit –a both adds and commits a file to the main branch • Later commits merge changes from branches into the main code • Must include a commit message!

  11. Getting Help for Git • http://ftp.newartisans.com/pub/git.from.bottom.up.pdf • http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html • http://git-scm.com/documentation

  12. Graphical Interfaces • http://git-cola.github.com/ • http://sourceforge.net/projects/qgit/ • More comprehensive list: https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#Web_Interface

  13. Wiki 101 • Create an account • Have Katie or Mike log in as WikiSysop • Go to http://titicaca.engin.umich.edu/mediawiki/index.php/Special:UserLogin Click this Change this Fill out the form • You will get an error about the email address: still working out why, but your account will be set up!

  14. Navigating Wiki Editing • To create a header: ==Header Text== • More ‘=‘ demotes the heading in the outline (e.g., Section 3 to Section 2.1) • Formatting basics: • ‘’italic’’ • ‘’’bold’’’ • ‘’’’bold & italic’’’’ • <strike> text </strike> • <nowiki> ignores wiki ‘’markup’’ </nowiki> • * bullet • ** indented bullet • HTML symbols • Still sorting out math libraries http://www.mediawiki.org/wiki/Help:Formatting

  15. Creating New Pages/ Linking • To create a new page in the Wiki, you have to create a link to it from somewhere else • Links are formatted as: • [http://example.org/index.php DISPLAY TEXT]

More Related