Tuesday, 3 September 2019

Git Repository setup for comparing by Raj Gupta


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~
$ ls
'3D Objects'/         Desktop/    'Local Settings'@   ntuser.dat.LOG1                                                                                ntuser.ini  'Saved Games'/   Videos/
 AppData/             Documents/   Music/             ntuser.dat.LOG2                                                                                Pictures/    Searches/
'Application Data'@   Downloads/  'My Documents'@     NTUSER.DAT{a057f24c-e827-11e8-81c0-0a917f905606}.TM.blf                                        PrintHood@   SendTo@
 Contacts/            Favorites/   NetHood@           NTUSER.DAT{a057f24c-e827-11e8-81c0-0a917f905606}.TMContainer00000000000000000001.regtrans-ms   projects/   'Start Menu'@
 Cookies@             Links/       NTUSER.DAT         NTUSER.DAT{a057f24c-e827-11e8-81c0-0a917f905606}.TMContainer00000000000000000002.regtrans-ms   Recent@      Templates@

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~
$ cd projects/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects
$ ls
hello-world/  starter-web/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects
$ cd hello-world/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ ls
Dockerfile  pom.xml  ramu.yyy  README.md  server/  start2.txt  webapp/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ cat README.md
# maven-project

Simple Maven Project

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is up to date with 'origin/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:   README.md

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

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git add README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (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)
        modified:   README.md


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git stats
git: 'stats' is not a git command. See 'git --help'.

The most similar command is
        status

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (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)
        modified:   README.md

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


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git commit README.md -m "commit"
[master 632f909] commit
 1 file changed, 1 insertion(+)

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (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

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

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")

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git add README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md

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


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff
diff --git a/README.md b/README.md
index 69e4c7b..e8b0c6f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # maven-project

 Simple Maven Project
-Raj Kumar Gupta
+Raj Kumar Gupta1

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool
q
      0 [sig] bash 2041! sigpacket::process: Suppressing signal 18 to win32 process (pid 4884)
      1 [sig] sh 2069! sigpacket::process: Suppressing signal 18 to win32 process (pid 2472)

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ q
bash: q: command not found

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md

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


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff HEAD
diff --git a/README.md b/README.md
index 894ea86..e8b0c6f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # maven-project

 Simple Maven Project
-Raj Gupta
+Raj Kumar Gupta1

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool HEAD

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff --staged HEAD
diff --git a/README.md b/README.md
index 894ea86..69e4c7b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # maven-project

 Simple Maven Project
-Raj Gupta
+Raj Kumar Gupta

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool --staged HEAD

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ ls
Dockerfile  pom.xml  ramu.yyy  README.md  server/  start2.txt  webapp/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi

[1]+  Stopped                 vi

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ vi start2.txt

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md

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
        modified:   start2.txt


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff
diff --git a/README.md b/README.md
index 69e4c7b..e8b0c6f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # maven-project

 Simple Maven Project
-Raj Kumar Gupta
+Raj Kumar Gupta1
diff --git a/start2.txt b/start2.txt
index 1fb25fb..52d986d 100644
--- a/start2.txt
+++ b/start2.txt
@@ -1 +1 @@
-This is Git Quick Start demo
+qThis is Git Quick Start demo

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff -- start2.txt
diff --git a/start2.txt b/start2.txt
index 1fb25fb..52d986d 100644
--- a/start2.txt
+++ b/start2.txt
@@ -1 +1 @@
-This is Git Quick Start demo
+qThis is Git Quick Start demo

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool -- start2.txt

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --oneline
632f909 (HEAD -> master) commit
8637d7a (origin/master, origin/HEAD) ignore
805a6ac Deleting new file
2678aa7 test
e144111 rename the file
5e8e01d Adding start test file
977ca2d Initial commit
34b2c44 updated file
0425ad1 update2
d8113f6 new line added
a29c62b modified index.jsp
a99e804 Update index.jsp
57a67c2 Update index.jsp
e18726d Update index.jsp
4a487a7 promotions comment
3a90027 Update index.jsp
f3ccb36 Update index.jsp
ad497a6 Update index.jsp
521d0fd modified index.jsp
73e663e modified index.jsp file for docker demo
691a7a2 modified index.jsp file
3e3afd8 Update Dockerfile
740736a Update Dockerfile
22e01c8 added docker file
1aa6466 Update index.jsp
5c693b0 latest code updated
7c81f41 Update index.jsp
4762ccd ansible added
9066612 new update
8127737 updated coc name
037bd4f updated index file
8d8c0b6 updated index file
5e95a23 Update index.jsp
a25d199 new update on index.html
438be18 Update README.md
3b7bdcd initial commit
2047f57 Create README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff e18726d HEAD
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7766a92
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.yyy
diff --git a/README.md b/README.md
index 8196d20..894ea86 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
 # maven-project

 Simple Maven Project
+Raj Gupta
diff --git a/start2.txt b/start2.txt
new file mode 100644
index 0000000..1fb25fb
--- /dev/null
+++ b/start2.txt
@@ -0,0 +1 @@
+This is Git Quick Start demo
diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp
index 6c4841b..2bbeedf 100644
--- a/webapp/src/main/webapp/index.jsp
+++ b/webapp/src/main/webapp/index.jsp
@@ -1,7 +1,2 @@
-<h1> Hello, Welcome to Valaxy Technologies !! </h1>
-<h2> AWS & DevOps training </h2>
-<h2> Happy learning </h2>
-<h2> Contact us on +91-9642-858583 </h2>
-<h2> Please subscribe to Valaxy Technologes Channel </h2>
-<h2> thanks for following us </h2>
-<h2> we accept donations </h2>
+<h1> Hello, Welcome to Valaxy Technologies !!! </h1>
+<h1> Raj Kumar Gupta 1234 </h1>

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff HEAD HEAD^
diff --git a/README.md b/README.md
index 894ea86..8196d20 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
 # maven-project

 Simple Maven Project
-Raj Gupta

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool HEAD HEAD^

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --oneline
632f909 (HEAD -> master) commit
8637d7a (origin/master, origin/HEAD) ignore
805a6ac Deleting new file
2678aa7 test
e144111 rename the file
5e8e01d Adding start test file
977ca2d Initial commit
34b2c44 updated file
0425ad1 update2
d8113f6 new line added
a29c62b modified index.jsp
a99e804 Update index.jsp
57a67c2 Update index.jsp
e18726d Update index.jsp
4a487a7 promotions comment
3a90027 Update index.jsp
f3ccb36 Update index.jsp
ad497a6 Update index.jsp
521d0fd modified index.jsp
73e663e modified index.jsp file for docker demo
691a7a2 modified index.jsp file
3e3afd8 Update Dockerfile
740736a Update Dockerfile
22e01c8 added docker file
1aa6466 Update index.jsp
5c693b0 latest code updated
7c81f41 Update index.jsp
4762ccd ansible added
9066612 new update
8127737 updated coc name
037bd4f updated index file
8d8c0b6 updated index file
5e95a23 Update index.jsp
a25d199 new update on index.html
438be18 Update README.md
3b7bdcd initial commit
2047f57 Create README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff 57a67c2 740736a
diff --git a/Dockerfile b/Dockerfile
index 70c73fe..b3eca31 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,3 +4,4 @@ From tomcat:8-jre8
 # Maintainer
 MAINTAINER "valaxytech@gmail.com"
 COPY ./webapp.war /usr/local/tomcat/webapps
+EXPOSE 80
diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp
index 015c17f..2cf3666 100644
--- a/webapp/src/main/webapp/index.jsp
+++ b/webapp/src/main/webapp/index.jsp
@@ -1,6 +1,3 @@
 <h1> Hello, Welcome to Valaxy Technologies !! </h1>
-<h2> AWS & DevOps training </h2>
-<h2> Happy learning </h2>
-<h2> Contact us on +91-9642-858583 </h2>
-<h2> Please subscribe to Valaxy Technologes Channel </h2>
-<h2> thanks for following us </h2>
+
+Deployment is going to happen through ansible

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool 57a67c2 740736a

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git diff master origin/master
diff --git a/README.md b/README.md
index 894ea86..8196d20 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
 # maven-project

 Simple Maven Project
-Raj Gupta

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git difftool master origin/master

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md

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
        modified:   start2.txt


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git add .

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md
        modified:   start2.txt


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git commit -m "commit all"
[master cbb7ab4] commit all
 2 files changed, 2 insertions(+), 2 deletions(-)

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git pull
Already up to date.

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git push origin master
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 633 bytes | 158.00 KiB/s, done.
Total 7 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
To https://github.com/rajkumargupta14/hello-world.git
   8637d7a..cbb7ab4  master -> master

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$

No comments:

Post a Comment