0% found this document useful (0 votes)
15 views6 pages

Git Reset

Uploaded by

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

Git Reset

Uploaded by

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

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)

$ ls
aboutus.html chatwithus.html file1.txt logout.html order.html profile.html
seller.html
cart.html feedback.html file2.txt offers.html product.html remotefile.txt
status.html

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


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

nothing to commit, working tree clean

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ touch aboutus.js cart.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ ls
aboutus.html cart.js file1.txt offers.html profile.html
status.html
aboutus.js chatwithus.html file2.txt order.html remotefile.txt
cart.html feedback.html logout.html product.html seller.html

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


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

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

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

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git add aboutus.js cart.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


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

Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: aboutus.js
new file: cart.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git commit -m "aboutus cart javascript code added"
[master 5f867cd] aboutus cart javascript code added
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 aboutus.js
create mode 100644 cart.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

nothing to commit, working tree clean

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
5f867cd (HEAD -> master) aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ ^C

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset --soft HEAD

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
5f867cd (HEAD -> master) aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset --hard HEAD
HEAD is now at 5f867cd aboutus cart javascript code added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
5f867cd (HEAD -> master) aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset HEAD

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
5f867cd (HEAD -> master) aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ ls
aboutus.html cart.js file1.txt offers.html profile.html
status.html
aboutus.js chatwithus.html file2.txt order.html remotefile.txt
cart.html feedback.html logout.html product.html seller.html

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

nothing to commit, working tree clean

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ touch offers.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ touch profile.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

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

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

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git add offers.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git commit -m "offers js code added"
[master 793520e] offers js code added
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 offers.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)

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

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

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset --soft HEAD

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git add profile.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
793520e (HEAD -> master) offers js code added
5f867cd aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added
swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)
$ git commit -m "added profile js code"
[master da1a1b9] added profile js code
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 profile.js

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
da1a1b9 (HEAD -> master) added profile js code
793520e offers js code added
5f867cd aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset 793520e

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
793520e (HEAD -> master) offers js code added
5f867cd aboutus cart javascript code added
9dd96ff (origin/master, origin/ecommapp_remote, origin/HEAD, ecommapp_remote)
Create remotefile.txt
7832c8d Merge pull request #2 from Swapnar-ExcelR/swapna_new
187647d (origin/swapna_new) Create file2.txt
d721daa Merge pull request #1 from Swapnar-ExcelR/swapna_new
6688f09 file1 added
348acb4 (swapna) updated code for aboutus added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git reset 6688f09
Unstaged changes after reset:
M aboutus.html

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git status
On branch master
Your branch is behind 'origin/master' by 5 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)

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: aboutus.html

Untracked files:
(use "git add <file>..." to include in what will be committed)
aboutus.js
cart.js
file2.txt
offers.js
profile.js
remotefile.txt

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

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ git log --oneline
6688f09 (HEAD -> master) file1 added
34543ec aboutus code added
a17dafb Merge branch 'swapna_new' into swapna
acf6130 chatwithus code added
9fa3cba status.html code updated
a922b31 (origin/swapna) offers code added
c4b6061 cart code added
8d48b5f Created logout.html
388d429 html files added

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$ ^C

swapn@GeoBook540 MINGW64 /c/Excelr/online ecommerce application (master)


$

You might also like