1. Install Git.
Http://git-scm.com/download/win
After the download, install it one step at a later stage.
2. Install the plugin.
Open the "System Management" –> "management plug-in", "optional plugins". Enter "Git" in "Filter", select "Git plugin" in the search results and click the "Install Directly" button.
3. Set up Git.
1) After the installation is complete, click "System Management" –> "System settings".
2) find "Git". Click on the "Add git" button and select "Git".
3) Enter a name in "Git name", such as "Jenkins_git".
Enter the path to Git.exe in path to Git executable. Say "D:\Git\bin\git.exe".
4) Click "Apply", "save" button.
4. Add Credentials.
Click "System Management", "Manage Credentials".
Click "Add Credentials". Since I am using the git address of open source China, choose "Username with Password". Enter Open source China username and password, such as "XXX", click "Save".
5. Create a new Git project.
Click "New". Enter "Item Name" and select "Build a free-style software project".
Find "Source control" and check "Git".
Repository URL: Enter the git address for the project.
Credentials: Select the Credentials you just added, such as "xxx/****".
Branches to build: Select the branch to build, such as "*/master".
Click "Apply" and "save".
6. Click "Build Now" to see the build results.
Jenkins Eight: Building a git project