git — beginners guide

  1. Check git version
$ git --version
$ git config --global user.name "Himanshu Pratap"
$ git config --global user.email himanshupratap@gmail.com
$ git config --list
$ git config --global core.editor "code --wait"
$ mkdir git_test
$ cd git_test
$ git init
$ git status
$ git add .
$ git commit -m "first commit"
$ git log --oneline
$ git log
$git checkout <commit> <file>
$ git remote add origin <repository url>
$ git push -u origin master
$ git clone <repository url>
$ git reset --hard <SOME-COMMIT> t
git fetch --all
git reset --hard origin/master

--

--

--

System Administrator and Full stack web developer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Practical application of Nested Calculations In Power Query

First week with Rust: I looked at Rust, I compared it, and I like it!

Automatic Door Lock System in Arduino Uno

Get Started Your First Mobile Top Down Shooting Game Development With Unity Visual Scripting Part 4

#100DaysofAWS | Day 31| AWS Shared Responsibility Model

Flutter — Introduction

How Continuous Testing Reduces the Overall Cost of Defects

Master Your Messenger Bot: Four Steps To Launch Your Bot

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Himanshu Pratap

Himanshu Pratap

System Administrator and Full stack web developer.

More from Medium

Git and GitHub (Part-1)

Git installation on Ubuntu

Git Basic Workflow

Quick reference guide to GIT COMMANDS