error
Network Error...
Check your network connection and reload or refresh this page.

JavaEE Training Note - Day 06

Today’s topic is configuration management which is mainly the source code management and version control. One of the famous solution for source code management is the Subversion (abbr. svn), a centralized version control system. It is common in enterprise development with an always-on central configuration management server as an authority (the trunk). Another popular solution is git, a de-centralized version control system. It is common in open source project development and each contributor can hold their own branch.

Subversion

Subversion itself is a project with long history. It is considered as the most accepted implementation of the source code management tool with a central server. Each user development their code base in a local machine and then commit to the central server. When the source code contains conflict with the center server, that is the source code to be committed into the server has modification to the updated code in the server, the user must address the conflict and resolve is before it can be accepted. Once the developing machine cannot access the center server, the source code cannot be committed.

Command line interface

The simple usage of Subversion is using the command line utility, which can be acquired via package management of system (apt, yum, brew, etc.). After the installation, use the svn command to perform the following action.

To get the source code from the center code, use the checkout command.

1
svn --username <user> --password <pass> checkout <server-address>

Here, the authentication is performed by command line argument, which can also be down by configure the subversion configuration file.

After update the source code, modification can be committed into the center server. In this case use the following command.

1
svn --username <user> --password <pass> commit -m <commit description>

IDE integration

As a wide used toolkit, most IDE can be configured to checkout source code form the central server and then push commit to it in graphic user interface.

Git

Git is originally designed and developed by Linus to manage the large code base of the Linux system. The main difference from Subversion is the de-centralized design. Another feature is the light-weight branching which leads the massive usage of branch in the Git pattern. GitHub is one of the largest and socialized open source project hosting platform, which use git as its core and popularized the usage of git.

CLI

Git is provided as a command line tool git, which is like the svn command. However, since the Git is de-centralized, the git is not a client of Git but the whole program which can perform both the role of client and the server. A general usage of git is represented as following:

IDE integration

As Subversion, most IDE also provide the support to Git.

CC-BY-SA 4.0
The content of this post is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
END
JavaEE Training Note - Day 05
JavaEE Training Note - Day 07
Disqus is loading...