Kebron Blog

Configure Git

May 27, 2019

Go back to Project Zero

Instruction

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.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. -git-scm.com

If you need more official information, please go to git-scm.com

Install

It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find the tarballs on kernel.org.

My laptop is Ubuntu 16.04. And i can install from apt-get package management tools.

## Fastest way to install git on debian/ubuntu os
apt-get install git

## Install git with sudo privilege. Remember if install git with sudo, then normal user cannot use git command without sudo privilege.
sudo apt-get install git

## Install Git with PPA

# register git-core to ppa
add-apt-repository ppa:git-core/ppa
# update apt => check if there is latest version
apt update
# install git
apt install git

More Details

Please look at followed link.

Create repository on github

  • Go to github.com and login.

  • Click button and create repository

    • Click new repository button

    new_repo

    • Fill unique repository name, and choose public / private and click create repository button.

    new_repo_detail

    • And you can see the page like this.

    new_repo_page

Initialize Git repository on your device

## Go to some directory or create new directory
cd Documents/projects
mkdir project-zero
cd project-zero

## Initialize or clone git repository
## Optional just take 1 way

## Clone
git clone https://github.com/ztkmkoo/project-zero.git

## Initialize with exist directory
git init
echo "# project-zero" >> README.md
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/ztkmkoo/project-zero.git
git push -u origin master  
  • Clone git repository result

    • it was made the directory automatically with your re pository name(project-zero for me

    init_clone

  • Initialize git repository menu

    • Initialize git with exist directory, and add a new file(Readme.md).
    • Commit the new file and push it to origin master branch repository git_init

Kebron

Written by Kebron who lives in Korea and works in NHN developing simple payment system(Payco). You should follow him on Github