Configure git on ubuntu machine
Configuring git on ubuntu machine is extremely easy.
First we would need to install git on the same machine.
Step 1: Install git on the machine
apt-get install -y git
Step 2: In case git is already installed, check git settings
git config --list
Step 3: Update git config file
git config --global user.email "luck.gagan@gmail.com"
git config --global user.name "Gagan"
Step 4: Initialize a git repo
mkdir GitSample
cd GitSample
git init
Step 5: Add content to git repo for commit
git add -A
Step 6: Commit your changes
git commit -m "First commit"
Step 7: Add your repo to remote. (I have used github)
git remote add origin https://github.com/luckgagan/gitsamplerepo.git
Step 8: Push
git push -u origin master
********************************You are done****************************
First we would need to install git on the same machine.
Step 1: Install git on the machine
apt-get install -y git
Step 2: In case git is already installed, check git settings
git config --list
Step 3: Update git config file
git config --global user.email "luck.gagan@gmail.com"
git config --global user.name "Gagan"
Step 4: Initialize a git repo
mkdir GitSample
cd GitSample
git init
Step 5: Add content to git repo for commit
git add -A
Step 6: Commit your changes
git commit -m "First commit"
Step 7: Add your repo to remote. (I have used github)
git remote add origin https://github.com/luckgagan/gitsamplerepo.git
Step 8: Push
git push -u origin master
********************************You are done****************************
Comments