Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

git status -to check the status of the folder

git init -to initiazile the empty folder


git add filename -to add that particular file to the stageing area
git add -a -to add all the file to the stageing area
git add --a -to add all the files to the stageing area after
modefing
git commit -m "message" -to commit and put message with
git log -to know what are the commits done

rm -rf .git -to delete current git repository/to delete the content
of that folder(linux){DANGEROUS COMMAND}

ls -(list) present all the content present in the folder.

pwd -(Present Working Directory) Used to show your present


working directory.

cd -(Change Directory) Used to change Directory and folder.

git clone <url> -Used to clone Repository. Ex. git clone <URL of your
Repo. in the form of HTTP>

NOTE:-If you want to change the name of your cloned repository from shell? then
type "git clone <URL of your Repo. in the form of HTTP>space <your file name>"

NOTE: git ignore empty folder or directory

NOTE:-To ignore files in git we will create .gitignore file using touch(ex:-
touch .gitignore) and store the filename with extension on this .gitignore file
(ex: touch error.log is a initial file then we store this in .gitignore file then
terminal will ignore error.log but .gitignore will be in modified stage)

to ignore multiple file:- *.filenameextension (if


eror.log ,error2.log to ignore these files use *.log save it in .gitignore)

to ignore directory :- directoryname/

touch anyfilename.extension -to generate a black file in the linux

You might also like