Git Cammands

 1.$git config--global user.name Shinde-Suyog

2.$git config--global user.email suyogs2001@gmail.com

3$ code .    Open vs code

4$ git init   initilize empty repo

5$git status   Check the current status

6$git add index.html.   Add the index  file

7.$git commit -m"any msg"

8 $ touch file name             create  empty file

9$ clear      Clear all terminal

10 $ git add -A       multipal files add to staging area

11$git checkout -f      If anyone earese your file do we can recover them by its cammand

12$git log      it display how many commit you do.

13git def       It show compare the working tree to staging area

14 git def--stage.  It compare tree to last working tree

15 ls   list the all files

22..ls -lart   It show the hidden folder

16 git rm--chached index .html.   It removes the file from staging area but it present in harddisk.

17 git rm    It remove the file permentaly

18git log -p-2 it show last 2 comments

19git checkout -b suyog  switching to new branch suyog

20git branch     Show the current branch

21git checkout master      switching to the master


#for upload project to GitHub repo

1.create empty repo on GitHub

2go to this folder which we want to upload and open with git bash

3.git init 

git status if status is red than

git add .

git commit-m'initial commit"

git status

git remote add origin #ssh link of repo

git push origin master--force



# for clone project from github to local computer

Copy the link of project 

cd desktop

git clone# paste link here














Popular posts from this blog

Final-Year Project