0% found this document useful (0 votes)
2 views

Git Commands

The document outlines basic Git commands including 'init', 'status', 'add', 'commit', 'log', and 'config'. It explains how to create a workspace, add files, configure user information, and commit changes to a repository. Additionally, it provides an example of the output from the 'git log' command after a commit.

Uploaded by

newsohel800
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Git Commands

The document outlines basic Git commands including 'init', 'status', 'add', 'commit', 'log', and 'config'. It explains how to create a workspace, add files, configure user information, and commit changes to a repository. Additionally, it provides an example of the output from the 'git log' command after a commit.

Uploaded by

newsohel800
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

BASIC GIT COMMANDS

1. init
2. status
3. add
4. commit
5. log
6. config

==create a workspace in any location of system


exp: c/myproject
==add some files
1.a.txt
2.b.txt

==an empty repository to be created for this we use a command called


git init
it will create a .git in the present working directory

==git status
it shows the status of the files whether the are tracked/untracked files

==git add a.txt b.txt


it makes the untracked files from our working directory to tracked files which is
nothing but adding files to staging area

==before committing the 1st commit we have to execute one command which is
git config --global user.email "[email protected]"=======and
git config --global user.name "sohel"

==to commit we use command called


git commit -m "some random comment"...................................

$ git log
commit 34de241f759286a631825edcfeb34cd7a532269a (HEAD -> master)
Author: sohel <[email protected]>
Date: Tue Jun 6 14:42:26 2023 +0530

1st commit

You might also like