Git

From YobiWiki
Jump to navigation Jump to search

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