GIT, 2015-06-16 22:56:11 UTC
Why should make your own Git server?
Git at this time as the tools required for workers in the field of software. Terms of works always include GIT. Large companies such as Google, Facebook, Microsoft, Twitter, Linkedin has been first to use Git as System Version Control.
Using Git to create an open software can be done by creating an open repository at github.com and this work is relatively easy because the server is handled by github.com so developers only need to think of the local repository. Using github paid version prevent code accessed in a non-open project. But on a private project, or developers with barely enough capital, certain other reasons can choose to install Git on the server itself.
Here are some of the advantages gained by making a Git server;
1. Low cost,
2. Protecting the code,
3. Well manage project,
4. Code can be done from anywhere,
5. Free to determine how many members of the team,
6. Can work collaboration.
Besides above advantages, there are disadvantages that Git on the server itself does not have a GUI so that every member of the team must know and understand its syntax.
Here is how to make their own Git server and examples of its use;
Setting GIT server
1. Run this code for Debian or Ubuntu
$ sudo apt-get install git
2. Configuring name and email
$ git config --global user.email "firstname.lastname@example.org" $ git config --global user.name "Your Name"
3. Buat folder repository Anda
$ mkdir repository
4. Change directory
$ cd repository
5. A remote repository on the server usually does not require a working tree. Git repository without working tree is called the bare repository. Here is the command to create a bare repository;
~/repository$ git init --bare project01.git Initialized empty Git repository in /home/your_name/repository/project01.git/
You can create local repository in 2 ways;
$ git clone email@example.com:/home/your_name/repository/project01.git
2. Init & Add origin
If you already have git project on your local computer and later you want push it into your git server, you can do as follows;
$ git init && git remote add origin your_name@your_server.com:repository/project01.git $ git push origin master