This tutorial will walk you through installing and configuring Git on an Ubuntu 18.04 server. For a more detailed version of this tutorial, with better explanations of each step
Step 1 — Update Default Packages
Logged into your Ubuntu 18.04 server as a sudo non-root user, first update your default packages.
$ sudo apt-get update
Step 2 — Verify Git is installed or not
Open terminal and type one of the following commands
Step 3 — Install Git
$ sudo apt-get install git -y (or) sudo apt-get install and press 'y' to continue the installation.
Step 3 — Confirm Successful Installation
$ which git - location/directory of the git
Step 4 — Set Up Git
Now that you have Git installed and to prevent warnings, you should configure it with your information.
Note: we have to provide git hub username and associate email
If you don`t have a git account please visit how to create Git account
git config --global user.name "Your Name"
Eg: git config --global user.name "krishnadasari"
git config --global user.email "youremail@domain.com"
Eg: git config --global user.email "dasarikrishna@gmail.com"
If you need to edit this file, you can use a text editor such as nano:
nano ~/.gitconfig
Now we are ready to create repositories in the git hub.
No comments:
Post a Comment