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

DevOPS Lab5

Uploaded by

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

DevOPS Lab5

Uploaded by

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

Lab – 5

Aim: Using Git-Bash environment to create repository and stage a file with performing commits
Description:
1. Installing Git in Local System?

Visit the web site https://git-scm.com/download/win


choose 64-bit Git for Windows setup
Run the setup file
Select next until entire setup process completes
If you need startup icon or runtime icon you can select checkboxes else left them unselect
After completion of installation
Git BASH console opened on screen as follows

2. Creating Environment for Git-Local?


set environmental path for GIT
type advanced system settings in search box
select <Environment Variables> button
select <New> button
Give a Name like "GITBash" in Variable Name
set Variable path as given below
"C:\Users\INTERNET\AppData\Local\Programs\Git\git-bash.exe"
3. Creating your Identity in GIT?
$ git config --global user.name "Dr BVRK"
$ git config --global user.password "123342"
$ git config --global user.email “[email protected]
$ git config user.name
Dr BVRK
$ git config user.email
[email protected]
$ git config user.password

Dr B.V. Rama Krishna Associate Professor (CSE)


123342
4. Create a new local repository in any folder?
$ git init
Initialized empty Git repository in E:/MYGitFiles/.git/
5. Stage files into repository created?
$ git add .
SamhiSesi@DESKTOP-F7HHS75 MINGW64 /e/mygitfiles (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: ReadMe.txt
new file: bvr1.java
6. Perform commit over staged documents
$ git commit -m "Performing Commit 002"
[master (root-commit) 28d6b76] Performing Commit 002
2 files changed, 16 insertions(+)
create mode 100644 ReadMe.txt
create mode 100644 bvr1.java
7. Performing un commit last operations
$ git reset --soft HEAD
SamhiSesi@DESKTOP-F7HHS75 MINGW64 /e/mygitfiles (master)
$ git status
On branch master
nothing to commit, working tree clean
SamhiSesi@DESKTOP-F7HHS75 MINGW64 /e/mygitfiles (master)
$ git reset HEAD
SamhiSesi@DESKTOP-F7HHS75 MINGW64 /e/mygitfiles (master)
$ git status
On branch master
nothing to commit, working tree clean
SamhiSesi@DESKTOP-F7HHS75 MINGW64 /e/mygitfiles (master)
$ ls
ReadMe.txt bvr1.java

Dr B.V. Rama Krishna Associate Professor (CSE)

You might also like