In Git flourishing today, I do not want to use Git to escape the spare time to write code to manage it.
We started here directly.
First, download the Git client
1, Git's official website: http: //git-scm.com/, download the client.
Official website of the client is to use the command line in the form of, for me this is too difficult for the novice. We need to engage in a graphical interface, is the following SmartGit.
2, SmartGit: http: //www.syntevo.com/smartgithg/, download system corresponding client, I am of Windows.
Second, the installation
Installation only two points that need attention
1, license: there is a trial, payment, non-commercial uses of three, according to one's own choice.
2, Hosting Providers: I use GitHub. Of course, you must first have a GitHub account, go https://github.com/ apply for a bar.
Third, the use of construction projects
1, log on GitHub site, in the lower right corner to find new repository, create a new project.
2, as follows, according to the actual situation fill
Here is my project created good.
3. Use SmartGit clone it down
Open SmartGit, in the menu select Repository-> Clone
Fill Repository URL: GitHub gives us the address, the address to find the items on the right side just completed project page and copied.
Next then Next, select a local folder for the project.
Click Finish, wait a moment, Output of information tells us, ok get. Just open the selected local folder to see it.
4, create, modify, and other operations submitted
Create a txt file in the folder, enter some text and save.
Back SmartGit found, Files form more than one file.
Right-click the file and select Commit, submit the form appeared.
Commit Message Notes version is submitted, it must be completed.
Commit is committed to the local Git repository.
Commit & Push is committed to the local Git repository and submitted to GitHub.
After Commit success, Files Form documents are missing. In the upper right corner of Files form has five buttons, you can set which files are displayed.
We open test.txt enter some text after saving, we found test.txt to red Modified state, and then commit.
Right first version of the record, you can select Reset to return to this version. Reset There are three models to choose from, mixed, soft, hard.
mixed: Workspace unchanged, reset the staging area, reset the current branch
soft: Workspace constant, temporary storage area unchanged, reset the current branch
hard: reset the workspace, reset the staging area, reset the current branch
PS: on the work area, staging area, how to understand the current branch, Git tutorial reference Liao Xuefeng - the work area and temporary area.
Summarize it, this is just a preliminary SmartGit use of reference, everything is hard in the beginning, the next will continue to explore it in daily use.