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

A1 Devops

Uploaded by

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

A1 Devops

Uploaded by

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

DEVOPS- 21CS62

A1. Demonstrate and Create project in local and remote repository using GitBash and GitHub
and apply init, status, log, add, commit, push, config, clone and reset commands on repository.

Git init command:


Description
The git init command is used to initialize a new Git repository in your project directory.

Syntax: git init


Example: git init

Git status command:


Description
The git status command is used to display the state of the working directory and the staging
area in a Git repository.

Syntax: git status


Example: git status

Git log command:


Description
The git log command displays a chronological list of the commits made in a repository's
history.

Syntax: git log


Example: git log

Git add command:


Description
The git add command is used to add new files, modified files, or even specific parts of files
to the staging area.

Syntax: git add <path>


Example: git add index.html

DEPT.OF CSE
DEVOPS- 21CS62

Git commit command:


Description
The git commit command is used to save or record changes in the Git repository.

Syntax: git commit -m "commit message"


Example: git commit -m "File is commited"

Git push command:


Description
The git push command is used to upload or push your local repository commits to a remote
repository,

Syntax: git push


Example: git push --all

Git config command:


Description
The git config command allows you to set various options that control the behavior of Git,
such as your username, email address, etc.

Syntax: git config [<scope>] <name> <value>


Example: git config --global user.name "John Doe"

Git clone command:


Description
The git clone command is used to create a copy of an existing Git repository.

Syntax: git clone <repository>


Example: git clone https://github.com/user/repo.git

Git Reset command:


Description
The git reset command is used to undo changes in the Git repository.

Syntax: git reset [<mode>] [<commit>]


Example: git reset --hard HEAD~1

DEPT.OF CSE
DEVOPS- 21CS62

Git user configuration details

Configuration Execution Viva Total Verified By

DEPT.OF CSE

You might also like