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

Git-Basics

The document outlines a series of Git commands executed in a terminal, detailing the creation of a project directory, initialization of a Git repository, and the management of files including adding, modifying, and deleting a 'names.txt' file. It also includes commands for stashing changes, configuring user information, and pushing changes to a remote repository on GitHub. The document concludes with the creation of an additional file 'houses.txt' within the project directory.

Uploaded by

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

Git-Basics

The document outlines a series of Git commands executed in a terminal, detailing the creation of a project directory, initialization of a Git repository, and the management of files including adding, modifying, and deleting a 'names.txt' file. It also includes commands for stashing changes, configuring user information, and pushing changes to a remote repository on GitHub. The document concludes with the creation of an additional file 'houses.txt' within the project directory.

Uploaded by

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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha

$ ls

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ mkdir project

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ ls
project/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ ls
project/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ cd project

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project


$ ls

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project


$

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project


$ git init
Initialized empty Git repository in D:/jasha/project/.git/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ ls -a
./ ../ .git/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ ls .git
HEAD config description hooks/ info/ objects/ refs/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master

No commits yet

Untracked files:
(use "git add <file>..." to include in what will be committed)
names.txt

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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master

No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git commit -m "names.txt file is added"
[master (root-commit) de609d8] names.txt file is added
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ vm names.txt
bash: vm: command not found

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ vi names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ cat names.txt
Jashandeep
Thomas
John
Arthur

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: names.txt

no changes added to commit (use "git add" and/or "git commit -a")

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add .
warning: in the working copy of 'names.txt', LF will be replaced by CRLF the next
time Git touches it

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git restore --staged names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: names.txt

no changes added to commit (use "git add" and/or "git commit -a")

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add names.txt
warning: in the working copy of 'names.txt', LF will be replaced by CRLF the next
time Git touches it

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git commit -m "names.txt file is now modified"
[master 8d52162] names.txt file is now modified
1 file changed, 4 insertions(+)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit 8d52162d570e6005f74237f76acf251982f359bf (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 11:00:17 2024 +0530

names.txt file is now modified

commit de609d82106224b3609b46ed0a3274daacd1af14
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ rm -rf names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: names.txt

no changes added to commit (use "git add" and/or "git commit -a")

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git commit -m "names.txt file is deleted"
[master e9864db] names.txt file is deleted
1 file changed, 4 deletions(-)
delete mode 100644 names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit e9864db23b1aa8ba5c13f93cef3d50a86e5af8c9 (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 11:08:34 2024 +0530

names.txt file is deleted

commit 8d52162d570e6005f74237f76acf251982f359bf
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 11:00:17 2024 +0530

names.txt file is now modified

commit de609d82106224b3609b46ed0a3274daacd1af14
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git reset ^[[200~de609d82106224b3609b46ed0a3274daacd1af14~

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit e9864db23b1aa8ba5c13f93cef3d50a86e5af8c9 (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 11:08:34 2024 +0530

names.txt file is deleted

commit 8d52162d570e6005f74237f76acf251982f359bf
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 11:00:17 2024 +0530

names.txt file is now modified

commit de609d82106224b3609b46ed0a3274daacd1af14
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git reset de609d82106224b3609b46ed0a3274daacd1af14
Unstaged changes after reset:
D names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit de609d82106224b3609b46ed0a3274daacd1af14 (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added


jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: names.txt

no changes added to commit (use "git add" and/or "git commit -a")

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ fit status
bash: fit: command not found

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: names.txt

Untracked files:
(use "git add <file>..." to include in what will be committed)
surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: names.txt -> surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ vi surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch houses.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add .
warning: in the working copy of 'surnames.txt', LF will be replaced by CRLF the
next time Git touches it

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: names.txt -> houses.txt
new file: surnames.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git stash
Saved working directory and index state WIP on master: de609d8 names.txt file is
added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit de609d82106224b3609b46ed0a3274daacd1af14 (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git stash pop
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: houses.txt
new file: surnames.txt

Changes not staged for commit:


(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: names.txt

Dropped refs/stash@{0} (75518b6d609978949a9ba30255e84554ab40a1bb)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add .

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git stash
Saved working directory and index state WIP on master: de609d8 names.txt file is
added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git stash clean
fatal: subcommand wasn't specified; 'push' can't be assumed due to unexpected token
'clean'

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git stash clear

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git config --global user.name
Jashandeep Singh

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git remote add origin https://github.com/Jashan-278/Git-Basics.git

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git remote -v
origin https://github.com/Jashan-278/Git-Basics.git (fetch)
origin https://github.com/Jashan-278/Git-Basics.git (push)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git push origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 229 bytes | 76.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/Jashan-278/Git-Basics.git
* [new branch] master -> master

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch houses.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git clean-f
git: 'clean-f' is not a git command. See 'git --help'.

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ ^[[200~rm -rf names.txt
bash: $'\E[200~rm': command not found

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ rm -rf houses.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ rm -rf fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ touch fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git commit -m "fruits.txt is added"
[master 1472629] fruits.txt is added
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ vi fruits.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git add fruits.txt
warning: in the working copy of 'fruits.txt', LF will be replaced by CRLF the next
time Git touches it

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git commit -m "fruits added"
[master 9da2387] fruits added
1 file changed, 3 insertions(+)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git log
commit 9da23876dcaa5df315736547d4431038c33c1475 (HEAD -> master)
Author: Jashandeep Singh <[email protected]>
Date: Tue May 7 10:54:06 2024 +0530

fruits added

commit 14726298152d5715d1ffad7997b19f53f0990db7
Author: Jashandeep Singh <[email protected]>
Date: Tue May 7 10:52:01 2024 +0530

fruits.txt is added

commit de609d82106224b3609b46ed0a3274daacd1af14 (origin/master)


Author: Jashandeep Singh <[email protected]>
Date: Mon May 6 10:41:09 2024 +0530

names.txt file is added

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git remote -v
origin https://github.com/Jashan-278/Git-Basics.git (fetch)
origin https://github.com/Jashan-278/Git-Basics.git (push)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git push origin master
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 526 bytes | 526.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/Jashan-278/Git-Basics.git
de609d8..9da2387 master -> master

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ git clone https://github.com/Jashan-278/Community-Classroom-OP.git
Cloning into 'Community-Classroom-OP'...
remote: Enumerating objects: 6, done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 6
Receiving objects: 100% (6/6), done.

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ ls
Community-Classroom-OP/ fruits.txt names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ cd Community_Classroom-OP
bash: cd: Community_Classroom-OP: No such file or directory
jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)
$ cd Community-Classroom-OP

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project/Community-Classroom-OP (main)


$ rm -rf .git

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project/Community-Classroom-OP (master)


$ rm -rf Community-Classroom-OP

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project/Community-Classroom-OP (master)


$ rm -r Community-Classroom-OP
rm: cannot remove 'Community-Classroom-OP': No such file or directory

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project/Community-Classroom-OP (master)


$ cd /d/jasha/project

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ rm -r Community-Classroom-OP

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/project (master)


$ cd /d/jasha

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ git clone https://github.com/Jashan-278/Community-Classroom-OP.git
Cloning into 'Community-Classroom-OP'...
remote: Enumerating objects: 6, done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 6
Receiving objects: 100% (6/6), done.

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ git remote add upstream https://github.com/Jashan-278/Community-Classroom-OP.git
fatal: not a git repository (or any of the parent directories): .git

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ git remote add upstream https://github.com/Jashan-278/Community-Classroom-OP.git
fatal: not a git repository (or any of the parent directories): .git

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ ls
Community-Classroom-OP/ project/

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha


$ cd Community-Classroom-OP

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git remote add upstream https://github.com/Jashan-278/Community-Classroom-OP.git

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git remote -v
origin https://github.com/Jashan-278/Community-Classroom-OP.git (fetch)
origin https://github.com/Jashan-278/Community-Classroom-OP.git (push)
upstream https://github.com/Jashan-278/Community-Classroom-OP.git (fetch)
upstream https://github.com/Jashan-278/Community-Classroom-OP.git (push)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ cat Community-Classroom-OP
cat: Community-Classroom-OP: No such file or directory
jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)
$ cat README.md
# Community Classroom OP

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ vi README.md

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:


(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: README.md

no changes added to commit (use "git add" and/or "git commit -a")

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git branch jashan

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git checkout jashan
Switched to branch 'jashan'
M README.md

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git add .

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git commit -m "Jashan added a message"
[jashan e0816bb] Jashan added a message
1 file changed, 1 insertion(+)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git log
commit e0816bbd19be570423a70d9c54f8f875392d8c09 (HEAD -> jashan)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:08:59 2024 +0530

Jashan added a message

commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)


Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500

Initial commit

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git push origin jashan
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 318 bytes | 318.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
remote:
remote: Create a pull request for 'jashan' on GitHub by visiting:
remote: https://github.com/Jashan-278/Community-Classroom-OP/pull/new/jashan
remote:
To https://github.com/Jashan-278/Community-Classroom-OP.git
* [new branch] jashan -> jashan

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ touch names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git add names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git commit -m "Jashan added a file"
[jashan 4e5879d] Jashan added a file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 names.txt

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git push origin jashan
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 288 bytes | 288.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/Jashan-278/Community-Classroom-OP.git
e0816bb..4e5879d jashan -> jashan

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git log
commit 4e5879d1b2936afc3d250effc21b62647019784a (HEAD -> jashan, origin/jashan)
Author: Jashandeep Singh <[email protected]>
commit 4e5879d1b2936afc3d250effc21b62647019784a (HEAD -> jashan, origin/jashan)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:30:20 2024 +0530

Jashan added a file

commit e0816bbd19be570423a70d9c54f8f875392d8c09
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:08:59 2024 +0530

Jashan added a message

commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)


Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500
...skipping...

SUMMARY OF LESS COMMANDS

Commands marked with * may be preceded by a number, N.


Notes in parentheses indicate the behavior if N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.

h H Display this help.


q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------

MOVING

e ^E j ^N CR * Forward one line (or N lines).


y ^Y k ^K ^P * Backward one line (or N lines).
f ^F ^V SPACE * Forward one window (or N lines).
b ^B ESC-v * Backward one window (or N lines).
z * Forward one window (and set window to N).
w * Backward one window (and set window to N).
ESC-SPACE * Forward one window, but don't stop at end-of-file.
d ^D * Forward one half-window (and set half-window to N).
u ^U * Backward one half-window (and set half-window to N).
ESC-) RightArrow * Right one half screen width (or N positions).
MOVING

e ^E j ^N CR * Forward one line (or N lines).


y ^Y k ^K ^P * Backward one line (or N lines).
f ^F ^V SPACE * Forward one window (or N lines).
b ^B ESC-v * Backward one window (or N lines).
z * Forward one window (and set window to N).
w * Backward one window (and set window to N).
ESC-SPACE * Forward one window, but don't stop at end-of-file.
d ^D * Forward one half-window (and set half-window to N).
u ^U * Backward one half-window (and set half-window to N).
ESC-) RightArrow * Right one half screen width (or N positions).
ESC-( LeftArrow * Left one half screen width (or N positions).
ESC-} ^RightArrow Right to last column displayed.
ESC-{ ^LeftArrow Left to first column.
F Forward forever; like "tail -f".
ESC-F Like F but stop when search pattern is found.
r ^R ^L Repaint screen.
R Repaint screen, discarding buffered input.
---------------------------------------------------
Default "window" is the screen height.
Default "half-window" is half of the screen height.
---------------------------------------------------------------------------
HELP -- Press RETURN for more, or q when done...skipping...
commit 4e5879d1b2936afc3d250effc21b62647019784a (HEAD -> jashan, origin/jashan)
commit 4e5879d1b2936afc3d250effc21b62647019784a (HEAD -> jashan, origin/jashan)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:30:20 2024 +0530

Jashan added a file

commit e0816bbd19be570423a70d9c54f8f875392d8c09
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:08:59 2024 +0530

Jashan added a message

commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)


Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500

Initial commit

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git reset e0816bbd19be570423a70d9c54f8f875392d8c09

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git status
On branch jashan
Untracked files:
(use "git add <file>..." to include in what will be committed)
names.txt

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

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git add .

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git stash
Saved working directory and index state WIP on jashan: e0816bb Jashan added a
message

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git stash clear

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git log
commit e0816bbd19be570423a70d9c54f8f875392d8c09 (HEAD -> jashan)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 11:08:59 2024 +0530

Jashan added a message

commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)


Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500

Initial commit

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git push origin jashan - f
error: src refspec - does not match any
error: src refspec f does not match any
error: failed to push some refs to 'https://github.com/Jashan-278/Community-
Classroom-OP.git'

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git push origin jashan -f
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/Jashan-278/Community-Classroom-OP.git
+ 4e5879d...e0816bb jashan -> jashan (forced update)

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (jashan)


$ git checkout main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git branch temp

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (main)


$ git checkout temp
Switched to branch 'temp'

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ touch 1

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git add .

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git commit -m "1"
[temp 85855e1] 1
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 1

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ touch 2

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git add .; git commit -m "2"
[temp 7bc1c16] 2
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 2

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ touch 3
jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)
$ git add .; git commit -m "3"
[temp ce844e6] 3
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 3

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git log
commit ce844e6a35276b69939671fb8e4dbcf5f3733205 (HEAD -> temp)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 12:49:14 2024 +0530

commit 7bc1c16196c347f427654a75654278cc18021669
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 12:48:32 2024 +0530

commit 85855e1f92a5f5ea2c35c2c927eb905ba8a189eb
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 12:48:00 2024 +0530

commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)


Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500

Initial commit

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git rebase -i 1b29daeb56eafa0974ad1deccc4eb678c818a105
[detached HEAD 7287474] Commits Merged
Date: Wed May 8 12:48:00 2024 +0530
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 1
create mode 100644 2
create mode 100644 3
Successfully rebased and updated refs/heads/temp.

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git log
commit 72874741b2a882f2e20a9190c1434470b5d17053 (HEAD -> temp)
Author: Jashandeep Singh <[email protected]>
Date: Wed May 8 12:48:00 2024 +0530

Commits Merged
commit 1b29daeb56eafa0974ad1deccc4eb678c818a105 (origin/main, origin/HEAD, main)
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:25 2022 +0500

Update README.md

commit 944105083795f03329d64c9d75e103fbeae9cc91
Author: CommunityClassroomOP
<[email protected]>
Date: Sat Nov 5 21:01:09 2022 +0500

Initial commit

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$ git reset --hard 1b29daeb56eafa0974ad1deccc4eb678c818a105
HEAD is now at 1b29dae Update README.md

jasha@DESKTOP-2DCM6SG MINGW64 /d/jasha/Community-Classroom-OP (temp)


$

You might also like