2017年7月25日 星期二

Install Git server on Ubuntu and use Source Tree on Windows platform



Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. This article will show you how to install Git server on Ubuntu and how to use Source Tree on Windows platform.

@Ubuntu environment
Step 1. Please use the following command to install Git.
$ sudo apt-get install git –y

Step2. Create the repository/folder.
For example:
If you need the repository/folder which its name is “volte.git”… Please use the following command to create the folder and this command will help you to create the relative files and sub folders.


Step 3. Use ifconfig to check the IP address in Ubuntu environment.
For example: The IP address is 10.9.113.102 in the environment.


 

@ Windows environment
Step 4. Please download SourceTree from Internet and install it.



Step 5. Open Source Tree and refer to the following snapshots to configure the environment.
ps. The Source Path/URL is ssh://samuel_liang@10.9.113.102:/home/samuel_liang/volte.git/

 

Step 6. Clone Repository.




  If you see the following error message, just change the “Destination Path”.
  


 For example: We change the “Destination Path” to C:\GIT_TEST



Step7. Because there are no files in the C:\GIT_TEST, you see it is empty in the Source Tree window.





Step 8. We can copy some files into C:\GIT_TEST

 
Step 9. And then, you can see that it has the files show in the Source Tree window.
 
 


Step 10. Prepare to upload the files to Git server.




Step 11. Push the files to Git server.

 

Step 12. Done. You can see the result in the Source Tree window.