William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

Tag Archives: git

git flow for quick retrieving

git flow for quick retrieving

I found the following article for quick retrieving of ‘git‘ -> github.com


To using git account, I created ssh-key in Ubuntu server and set public keys my git account in github.com, they work properily.

$ ssh-keygen -t rsa

Aptana plugin for git, jQuery

Aptana plugin for git, jQuery

Normally I use different tools to develop PHP, Perl:

  • Aptana for PHP and Perl projects
  • Dreamweaver for PHP project
  • vim for Perl and PHP, and other scripts
  • Others, such as notepad++, gVim, UltraEdit32 etc for documentary

For GUI tools, we can integrate some useful plugins:

  • git plugin in Aptana
  • jQuery plugin in Aptana
  • Some CSS plugin if have

This will be benefit for developer: embeded jQuery functions, git auto commit options; and, is it possible in the GUI, when import library/plugin, the editor can auto import its methods for inner-link?

Linux: install git

To better do the projects version control, I installed git in a Linux server. Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It is from Linus Torvalds himself, and use widely.

The following are the steps (to install git in /usr/bin, also install doc/ info/):

-- download
$ wget http://kernel.org/pub/software/scm/git/git-
-- extract
$ tar -jxvf git-
-- compile
$ cd git-
$ make prefix=/usr all doc info

Error occurs:
curl-config can not found.

According to wiki, cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL.

In order to install git, we need to install libcurl.
Before start, we make sure gcc is installed. Without gcc, compile and build can’t execute.

-- download
$ wget http://curl.haxx.se/download/curl-7.21.2.tar.gz
-- extract
$ tar -zxvf curl-7.21.2.tar.gz
-- compile
$ cd curl-7.21.2
$ make
-- install
$ sudo make install

It works. So return to the beginning, to install git:

$ make prefix=/usr all doc info
$ sudo make install

The installation succeeds, to double check it:

$ type git
git is hashed (/usr/bin/git)
$  git --version
git version

Yes, it works. So next step, we can use git to do the version control.

$ git init
$ git add
$ git commit

notice:’make install’ need root privilege to install git binary files to system directory /usr/bin/, so root permission is needed.
For in Windows, we need to install ‘Git GUI‘, a alternative useful tool is kdiff3, which compares files in a very efficient and smart way.

Version control: git or cvs

For the version control, I use 2 of them: CVS, and git. Here is a summary of the 2 famous tools.

(1) CVS
This is traditional way which is related with rcs, Unix way for version control.
The Concurrent Versions System (CVS), also known as the Concurrent Versioning System, is a client-server free software revision control system in the field of software development. Version control system software keeps track of all work and all changes in a set of files, and allows several developers (potentially widely separated in space and/or time) to collaborate.

I like the $Id$, which marks as cvs control and will extend when ‘cvs commit/update’.
It is quite convenient for the development, in a Client-Server mode.

I wrote 2 documents for the maintaining of projects. They are for server site configure as well as client side utilizing.
(1.a) server side:
CVS server document
(1.b) client side:
CVS client document (WinCVS)

(2) git
The fast version control system is the new popular way.
Some big sites such as prototype scriptaculousalready uses it.

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.

I am currently using it as version control tool, the syntax is very similar with CVS, quite easy to add, modify, remove, check status, versions comparing, and merging different version etc.
Here is a illustration which list the key functions:
git illustration

git or cvs? There are not big difference between them, either works.
For a linux guy, git would be the first choice, coz it easily uses command-lines; and its repository is under the project directory ($HOME/project/.git/), easy to maintain.
For cvs, it has a windows screen which is a pure GUI environment, suitable for GUI user; its repository is out of current project, it seems better for big project management.