DevOps Lab
DevOps Lab
1. Build a branching model to help your team understand the Git workflow for faster integration of
work.
git -Version :- The git -v command shows the version of Git you are currently
using.
git init :- The git init command initializes a new Git repository in the
current directory, setting up the necessary metadata and configuration to
start tracking changes.
mkdir :- The mkdir command is used to create a new directory (folder) in your
file system.
git status :- The git status command displays the current state of the
working directory and staging area, including which files are staged,
unstaged, or untracked.
92210103022 |1
FACULTY OF ENGINEERING AND TECHNOLOGY
Department of Computer Engineering
01CE0717 – DevOps Essentials – Lab Manual
git add <file name> :- The git add <file name> command stages a specific
file, preparing it for inclusion in the next commit.
git add -A :- The git add -A command stages all changes in the working
directory, including new files, modified files, and deleted files, for the
next commit.
git commit -m “message” :- The git commit -m "message" command creates a new
commit with the changes staged and includes a descriptive message about the
commit.
git log :- The git log command displays a chronological list of commits in
the current branch, showing details such as commit hashes, authors, dates,
and commit messages.
git branch :- The git branch command lists all branches in your repository
and indicates the current active branch.
92210103022 |2
FACULTY OF ENGINEERING AND TECHNOLOGY
Department of Computer Engineering
01CE0717 – DevOps Essentials – Lab Manual
git config --global user.name “name” :- The git config --global user.name
"name" command sets the global Git username used for commits across all
repositories on your system.
git config --global user.email “email” :- The git config --global user.email
"email" command sets the global Git email address used for commits across all
repositories on your system.
git push -u origin main :- The git push -u origin main pushes your local main
branch to the remote repository named origin and sets it as the upstream
branch for future pushes and pulls.
92210103022 |3
FACULTY OF ENGINEERING AND TECHNOLOGY
Department of Computer Engineering
01CE0717 – DevOps Essentials – Lab Manual
92210103022 |4