Git

From Net-SNMP Wiki
Revision as of 23:33, 26 May 2011 by Wes (Talk | contribs) (update for new git info)

Jump to: navigation, search

Git is a version control system (VCS) that is based on a distributed architecture. In May, 2011 the Net-SNMP project will switch from SVN to Git.

Checking out the Net-SNMP Git Tree

Select a git MODULE:

  • htdocs

Check it out anonymously (read-only access):

 git clone git://net-snmp.git.sourceforge.net/gitroot/net-snmp/MODULE

Checking it out if you're a developer:

 git clone ssh://USERNAME@net-snmp.git.sourceforge.net/gitroot/net-snmp/MODULE

Other critical initial setup

In order to make sure your email address and name are correct:

 git config user.email "YOURSFACCOUNTNAME@users.sourceforge.net"
 git config user.name "YOUR NAME"

Making changes

This is where you type "vi" or "emacs" or if you're brave "perl -i -p -e ..."

Committing the changes

 git commit -m "commit message" FILES

Or if you want to commit everything in a directory and down, use a directory name instead of FILES.

Or if you want to commit everything anywhere in the repo, use the -a switch.

Learning Git

If you're starting out learning Git, here are some useful resources:

Git work flows