Difference between revisions of "Git"

From YobiWiki
Jump to navigation Jump to search
m (New page: ==git== ===Links=== * http://git.or.cz/course/svn.html * http://www-cs-students.stanford.edu/~blynn/gitmagic/ * http://en.wikipedia.org/wiki/Git_(software) ===Install=== sudo apt-get i...)
 
m
Line 1: Line 1:
 
==Links==
 
==git==
 
 
===Links===
 
 
* http://git.or.cz/course/svn.html
 
* http://git.or.cz/course/svn.html
 
* http://www-cs-students.stanford.edu/~blynn/gitmagic/
 
* http://www-cs-students.stanford.edu/~blynn/gitmagic/
 
* http://en.wikipedia.org/wiki/Git_(software)
 
* http://en.wikipedia.org/wiki/Git_(software)
   
===Install===
+
==Install==
 
sudo apt-get install git-svn git-doc git-gui tig
 
sudo apt-get install git-svn git-doc git-gui tig
  +
Writing to global ~/.gitconfig file:
 
git config --global user.name "Your Name Comes Here"
 
git config --global user.name "Your Name Comes Here"
 
git config --global user.email you@yourdomain.example.com
 
git config --global user.email you@yourdomain.example.com
Line 14: Line 12:
 
git config --global color.status auto
 
git config --global color.status auto
 
git config --global color.branch auto
 
git config --global color.branch auto
  +
Creating a .git in the current (project) directory:
 
git init
 
git init
===Using a Subversion server===
+
==Using a Subversion server==
 
Getting the full project:
 
Getting the full project:
 
git-svn clone http://subversion.server.com/project -T trunk -b branches -t tags
 
git-svn clone http://subversion.server.com/project -T trunk -b branches -t tags
Line 23: Line 22:
 
Sending the local changes to the subversion server:
 
Sending the local changes to the subversion server:
 
git-svn dcommit
 
git-svn dcommit
===Ignoring some files===
+
==Ignoring some files==
 
cat > .gitignore <<EOF
 
cat > .gitignore <<EOF
 
*.pyc
 
*.pyc

Revision as of 21:57, 16 September 2008

Links

Install

sudo apt-get install git-svn git-doc git-gui tig

Writing to global ~/.gitconfig file:

git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto

Creating a .git in the current (project) directory:

git init

Using a Subversion server

Getting the full project:

git-svn clone http://subversion.server.com/project -T trunk -b branches -t tags
(git-gc to compress if it took a big room)

Updating the local repository according to the subversion server:

git-svn rebase

Sending the local changes to the subversion server:

git-svn dcommit

Ignoring some files

cat > .gitignore <<EOF
*.pyc
*~
EOF
git add .gitignore