Skip to content

ganeshbhandarkar/git-commands

Repository files navigation

GIT COMMANDS

Demo

fetch all origin repo stuff to forked repo

tell all commands

git

Clone all the repo files to pc

git clone

verbose commands

git -help or help

Important while working with teams

to initiate project

git init

to know which branch you are working

git status

for the changes made in unique file or existing file or to create new branch

git checkout

creates new branch and set to current branch

git checkout -b branch-name

the star branch is current branch

git branch --list

to create branch and then git checkout branch-name to set it as current branch

git branch branch-name

to make updates in stack and can checkout the other branches

git stash

delete branch locally

git branch -d branch-name

delete branch remotely

git push -delete origin

synchronize your branch list

git fetch -p

fetch all from current repo

git fetch --all

display all branches with remote/origin

git branch -a

display all branches then succeed with => git checkout branch-name => git pull

git branch -r

Important with the adding process

to make all new changes to files added or changed

git add .

adding new A for ALL

git add -A

message passing

git commit -m ""

pushing to git

git push

getting from git

git pull

overwriting local changes

git stash push --include-untracked

removing stash

git stash drop

ReadMe.md Template

image

image image

Releases

No releases published

Packages

No packages published