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

gitDemo

The document details a series of Git commands executed in a terminal, starting with initializing a new Git repository and creating several files. The user configures their identity, makes an initial commit, and sets up a remote repository on GitHub. Finally, the user pushes the commit to GitHub and performs a clone operation of the repository.

Uploaded by

Abhinav Kora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

gitDemo

The document details a series of Git commands executed in a terminal, starting with initializing a new Git repository and creating several files. The user configures their identity, makes an initial commit, and sets up a remote repository on GitHub. Finally, the user pushes the commit to GitHub and performs a clone operation of the repository.

Uploaded by

Abhinav Kora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo

$ git status
fatal: not a git repository (or any of the parent directories): .git

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo


$ git init
Initialized empty Git repository in C:/Users/ADC/Desktop/BGMITGitDemo/.git/

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git status
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ touch index.html

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ touch f1.txt

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ touch p1.py

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ touch login.java

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git status
On branch master

No commits yet

Untracked files:
(use "git add <file>..." to include in what will be committed)
f1.txt
index.html
login.java
p1.py

nothing added to commit but untracked files present (use "git add" to track)

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git add .

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git status
On branch master

No commits yet

Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: f1.txt
new file: index.html
new file: login.java
new file: p1.py

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git commit -m "Initial commit - Added some files to the project"
Author identity unknown

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"


git config --global user.name "Your Name"

to set your account's default identity.


Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'ADC@DESKTOP-OGTE93A.(none)')

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git config --global user.email "[email protected]"

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git config --global user.name "AravindBijjaragi"

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git commit -m "Initial commit - Added some files to the project"
[master (root-commit) 9ea9427] Initial commit - Added some files to the project
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 f1.txt
create mode 100644 index.html
create mode 100644 login.java
create mode 100644 p1.py

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git status
On branch master
nothing to commit, working tree clean

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git remote add origin https://github.com/AravindBijjaragi/BGMIT-Git-Demo.git

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git push -u origin master
info: please complete authentication in your browser...
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 270 bytes | 270.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/AravindBijjaragi/BGMIT-Git-Demo.git
* [new branch] master -> master
branch 'master' set up to track 'origin/master'.

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git log
commit 9ea9427e1b037a89d429260f3f26cbb1924ce420 (HEAD -> master, origin/master)
Author: AravindBijjaragi <[email protected]>
Date: Wed Feb 12 12:21:10 2025 +0530

Initial commit - Added some files to the project

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git log --oneline
9ea9427 (HEAD -> master, origin/master) Initial commit - Added some files to the
project

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git pull
Already up to date.

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git fetch

ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)


$ git clone https://github.com/AravindBijjaragi/BGMIT-Git-Demo.git
Cloning into 'BGMIT-Git-Demo'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (3/3), done.
ADC@DESKTOP-OGTE93A MINGW64 ~/Desktop/BGMITGitDemo (master)
$

You might also like