Tortoisegit routine User Guide

Source: Internet
Author: User
ArticleDirectory
    • 2. Installation
    • (2) install tortoisegit
    • 3. Set
    • 4. Routine usage

After introducing software installation and setup, this article describes some common features of tortoisegit, including:
Create a new database
Add files and folders
Create Branch
View branch status and modify log
Compare version differences
Merge Branch
Other operations: Stash; ignore files
This article does not include:
Git server settings
Push version to server
Pull version from other machines
Solve Chinese Character Problems
The help documents of pro git and tortoisegit are two good references.
For more information, see the tortoisegit help documentation. It is better for git usage and file storage.
.
Compared with common CVs, git has the following advantages:
Version management can be achieved without connecting to the server;
No matter how many directories a library has, there is only one management directory.
The entire project can be commit during commit, so that you do not need to add a tag
Save the version information.
Instructions can be added during tag creation.

2. Installation

(1) install msysgit
Go to http://code.google.com/p/msysgit/download msysgit. The latest version that can be downloaded is
Git-1.7.9-preview20120201.exe

During installation, when setting the line to end the conversion, select checkout as-is, commit as-is,
In this way, git will not change the line feed style. You can use the default settings for other settings.

 

 

(2) install tortoisegit

Go to http://code.google.com/p/tortoisegit/download tortoisegit. The latest version is
TortoiseGit-1.7.7.0-64bit.msi

TortoiseGit-1.7.7.0-32bit.msi

During installation, select tortoiseplink
After the two software are installed, you can start using them.

 

3. Set

First to tortoisegitProgramGroup.


The user information must be set first. Other operations cannot be completed without the user information.


Then you can customize the context menu.


During customization, note that the selected option is not displayed during set extend menu item.
When you right-click a folder and press shift to display the hidden menu.


In external programs, you can also set a comparison tool. I set winmerge to compare
Tool.

4. Routine usage

(1) create a new database
Right-click the folder and select git create repository here to create the library.

In the displayed window, if you do not select the option, press OK

A hidden folder named. Git appears in the directory.
This folder exists. No matter how many folders are added to this project, the entire library will only have this
A management folder, which is quite different from CVS and SVN.
(2) Add files and folders

Right-click the folder and choose git commit-> "master "...
Enter the message and check the whole project option, so that the entire
The project information is all commit, so that you can checkout every time you do not need to tag
Commit content.
Access the modified foo1.txt file, create a folder dir1, and place a foo2.txt file in the dir1 directory.
When you commit again, you can add dir1 and foo2.txt together.

(3) create a branch
Select tortoisegit in the directory and then create branch... You can create a branch.

Select switch to new branch to jump to the created branch.

Modify commit after saving a foo3.txt file.
Then switch/checkout .... Switch back to master Branch

Create another branch2. In branch2, skip foo4.txt. You can see the version Development
This is the case.
(4) view the branch status and modify the log
By selecting show log, you can view the branch status and modify log

Check all branches to view all the branches. In the message column, the branches are green and the branches are red.

(5) compare version differences
By pressing shift and the left mouse button, you can select two versions, and then right-click and select compare revisions to compare the two revisions.

Comparing the main version and branch2, we can find that foo4.txt is missing.

(6) merge branches
First switch to the master branch, and then select merge

Merge the branches to the main version.


(7) Other operations
A) stash
Git provides a temporary modification function called stash, which can be used to modify stash when some programs are modified but do not want to commit the changes to revision, wait until it is needed.
Pop them out.
B) Ignore files
Some editors generate BAK files after modifying files. Generally, you do not want these backup files to be added to the database. You can select one. bak file, and then select *. bak.
Will not be commit.

The ignored file is implemented by adding a. gitignore file to the project directory. Therefore, you must add. gitignore to the ignored file list.

[References]
■ tortoisegit Help File tortoisegit installation directory
■ pro git http://progit.org/
■ tortoisegit getting started
■ git adventures
■ msysgit configuration and Chinese support
■ use the version management tool git in Windows
■ SSH git server on windows -- configure git server on Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.