Git Commands To Get You Started With Programming.

Some of the most useful git commands to get you started with programming.

config

git config config.name config.value
git config user.name "John Doe" 
git config user.email "john.doe@getnada.com"
git config --global user.name
// John Doe

clone

git clone "PATH-TO-REMOTE-REPO"

fetch

git fetch

branch

git branch --list
// all the local branches
git branch  --list -r // all the remote branches 
git branch --list -a // all the remote + local branches

checkout

git checkout -b <branch> --track <remote>/<branch>

stash

git stash
git stash
git stash list
git stash show <stash>
git stash apply <stash>

status

git status
➜ dummy project git:(feature-one) 
✗ git status On branch feature-one Your branch is up to date with 'origin/feature-one'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: src/resources.js
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: src/ban.js

clean

git clean

--

--

Hey 👋, I am Adarsh, a Web Developer from 🇮🇳

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