Devops Exp 2
Devops Exp 2
manual
EXPERIMENT-2:
Navigate to your repository and copy the HTTPS link for cloning the remote repository to
local repository
TOKEN GENERATION :
Git Commands
git -v : Displays the version of Git installed in your system.
git clone <repository url> :Clones an existing repository from a remote location(eg:GitHub).
git init :Initializes a new Git repository
git status :Shows the working directory status,including changes and untracked files.
git add <file> :Adds a specific file to the storing area.
git commit -m “commit message” :Commits changes in the staging area with a message.
git config user.name <username> :Sets the name you want attached to your
commit transactions.
git config user.email <email> :Sets the email you want attached to your commit transactions.
git push -u origin :Pushes your local branch to the remote repository at origin.
git log :Shows the commit history
git log --oneline :Each commit is shown on a single line,including the abbreviated commit
hash and commit message.
Cloning to ‘labexperiment1’...
Warning: you appear to have cloned an empty repository.
STUDENT@SAIS-LAB02-39 MINGW64 /d/devops539
$ cd lab1/
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed) index.html
nothing added to commit but untracked files present (use "git add" to track)
STUDENT@SAIS-LAB02-39 MINGW64 /d/devops539/lab1/lab1 (main)
$ git add index.html
warning: in the working copy of 'index.html', LF will be replaced by CRLF the next time Git touches it