Install GIT

Here are few steps to follow in order to install GIT versioning on your local machine e.g. in Ubuntu.

Installation

sudo apt-get install git

Configuration

git config --global user.email "you@example.com"
     git config --global user.name "Your Name"

Basic usage

git init --bare /path/to/your/local/repository
           This creates a bare repository, that cannot be used to edit files directly.
           If you would rather have a working copy of the contents of  the repository on the server, omit the --bare option.

From here onwards, Any client with ssh access to the machine can from then on clone the repository with

git clone username@hostname:/path/to/repository/you/want/to/clone

Once cloned to the client's machine, the client can edit files, then commit and share them with:

 

cd /path/to/your/local/repository
#edit some files
git commit -a                                 #Commit all changes to the local version of the repository
git push origin master               #Push changes to the server's version of the repository

Reference :
     https://help.ubuntu.com/lts/serverguide/git.html
     https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control

Add new comment