Thursday, September 15, 2011

Using Git as a working logger

I am working on a project, which is a experimental program coded and maintained by myself.

It is redundant and seems stupid to copy the whole working folder whenever I want to change the code to another version. Especially when the folder contains not only source code but some other documents or videos of testing results.

``I need a version control tool.'' The idea came to my mind.

``But I've never used or been familiar with any.'' The truth is cruel.

Then I thought of Git, a term which I might saw several times when surfing webpages.

Because the project I am working on is written and compiled with Visual Studio 2005, I started to search how to use Git with VS2005 and found Git Extensions.



Just download the GitExtensions224SetupComplete.msi and install it, there will be an item added on the main menu of VS2005 as shown in Fig. 1.

Figure 1. Git Extensions on the main menu with its drop-down.

I played around with Git to get basic understandings. Although Git is designed for version control for group cooperation, I found it also suitable for personal usage. Now I use it as a working logger, and I can go back to certain status which has been recorded by Git.

Here I will show some screenshots of my own working program with Git. Fig. 2 shows the steps to commit the changes. After the committing, you can view the committed status with the details (see Fig. 3 and Fig. 4).

Figure 2. Steps of Commit the changes.
Figure 3. View the committed status.
Figure 4. The details of committed content.
All the records are in the .git folder resides in the working directory. The .gitignore file is used to tell Git which file is not necessary to track.

Figure 5. The .git folder and .gitignore file in the working directory.

No comments:

Post a Comment