Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ which git
/mingw64/bin/git
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git checkout -b myfeature
Switched to a new branch 'myfeature'
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ ls
Dockerfile pom.xml ramu.yyy README.md server/ start2.txt webapp/
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ vi start2.txt
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git status
On branch myfeature
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: start2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git commit -am "changes"
[myfeature 241ea57] changes
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git status
On branch myfeature
nothing to commit, working tree clean
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 8 commits.
(use "git push" to publish your local commits)
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 README.md
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 8 commits.
(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 commit -am "changes"
[master af11240] changes
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 9 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --oneline --decorate --all --graph
* af11240 (HEAD -> master) changes
| * 241ea57 (myfeature) changes
|/
* 715560d master changes
| * e5164f5 (realwork) changes
|/
* 9fc9b59 Merging changes from simple-changes brance
|\
| * 7fffcc8 adding
* | 7277340 adding
|/
* 39c29d9 Merge branch 'add-copyright' Raj
|\
| * de62fc3 adding line
| * 8746b9d Adding copyright notice
|/
* 218d0ee changes done to file
* cbb7ab4 (origin/master, origin/HEAD) commit all
* 632f909 commit
* 8637d7a 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
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git brances
git: 'brances' is not a git command. See 'git --help'.
The most similar command is
branch
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch
* master
myfeature
realwork
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch -d realwork
error: The branch 'realwork' is not fully merged.
If you are sure you want to delete it, run 'git branch -D realwork'.
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch -D realwork
Deleted branch realwork (was e5164f5).
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch
* master
myfeature
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git checkout myfeature
Switched to branch 'myfeature'
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: changes
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git log --oneline --decorate --all --graph
* 97c0cb7 (HEAD -> myfeature) changes
* af11240 (master) changes
* 715560d master changes
* 9fc9b59 Merging changes from simple-changes brance
|\
| * 7fffcc8 adding
* | 7277340 adding
|/
* 39c29d9 Merge branch 'add-copyright' Raj
|\
| * de62fc3 adding line
| * 8746b9d Adding copyright notice
|/
* 218d0ee changes done to file
* cbb7ab4 (origin/master, origin/HEAD) commit all
* 632f909 commit
* 8637d7a 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
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ ls
Dockerfile pom.xml ramu.yyy README.md server/ start2.txt webapp/
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ vi README.md
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git status
On branch myfeature
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 (myfeature)
$ git commit -am "adding"
[myfeature 769e39c] adding
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git status
On branch myfeature
nothing to commit, working tree clean
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (myfeature)
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 9 commits.
(use "git push" to publish your local commits)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch -d myfeature
error: The branch 'myfeature' is not fully merged.
If you are sure you want to delete it, run 'git branch -D myfeature'.
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git merg myfeature
git: 'merg' is not a git command. See 'git --help'.
The most similar commands are
merge
grep
mktree
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git merge myfeature
Updating af11240..769e39c
Fast-forward
README.md | 2 +-
start2.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch -d myfeature
Deleted branch myfeature (was 769e39c).
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch
* master
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 start2.txt
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 11 commits.
(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: start2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git commit -am "changes"
[master 92a780f] changes
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git checkout -b big
Switched to a new branch 'big'
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ ls
Dockerfile pom.xml ramu.yyy README.md server/ start2.txt webapp/
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ vi start2.txt
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git status
On branch big
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: start2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git commit -am "changes"
[big d05fb70] changes
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git status
On branch big
nothing to commit, working tree clean
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 12 commits.
(use "git push" to publish your local commits)
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 12 commits.
(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: start2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git commit -am "changes"
[master 7ffb2d1] changes
1 file changed, 1 insertion(+), 1 deletion(-)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 13 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --oneline --decorate --all --graph
* 7ffb2d1 (HEAD -> master) changes
| * d05fb70 (big) changes
|/
* 92a780f changes
* 769e39c adding
* 97c0cb7 changes
* af11240 changes
* 715560d master changes
* 9fc9b59 Merging changes from simple-changes brance
|\
| * 7fffcc8 adding
* | 7277340 adding
|/
* 39c29d9 Merge branch 'add-copyright' Raj
|\
| * de62fc3 adding line
| * 8746b9d Adding copyright notice
|/
* 218d0ee changes done to file
* cbb7ab4 (origin/master, origin/HEAD) commit all
* 632f909 commit
* 8637d7a 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
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git checkout big
Switched to branch 'big'
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git branch
* big
master
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git difftool master big
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git rebase mmaster
fatal: invalid upstream 'mmaster'
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git rebase master
First, rewinding head to replay your work on top of it...
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git rebase --abort
fatal: No rebase in progress?
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git mergetool
No files need merging
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (big)
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 13 commits.
(use "git push" to publish your local commits)
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git pull orgin master
fatal: 'orgin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git pull origin master
From https://github.com/rajkumargupta14/hello-world
* branch master -> FETCH_HEAD
Already up to date.
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git push origin master
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (23/23), 2.05 KiB | 233.00 KiB/s, done.
Total 23 (delta 15), reused 1 (delta 0)
remote: Resolving deltas: 100% (15/15), completed with 2 local objects.
To https://github.com/rajkumargupta14/hello-world.git
cbb7ab4..7ffb2d1 master -> master
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)
$ ls
Dockerfile pom.xml ramu.yyy README.md server/ start2.txt webapp/
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 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: start2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git commit -am "changes"
[master 87d3aad] changes
1 file changed, 1 insertion(+), 1 deletion(-)
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)
$ git fetch origin master
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 3 (delta 2), reused 2 (delta 2), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/rajkumargupta14/hello-world
* branch master -> FETCH_HEAD
7ffb2d1..01e33a7 master -> origin/master
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git pull --rebase origin master
From https://github.com/rajkumargupta14/hello-world
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: changes
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)
$ git log --oneline --decorate --all --graph
* 0199c9d (HEAD -> master) changes
* 01e33a7 (origin/master, origin/HEAD) remte
* 7ffb2d1 (big) changes
* 92a780f changes
* 769e39c adding
* 97c0cb7 changes
* af11240 changes
* 715560d master changes
* 9fc9b59 Merging changes from simple-changes brance
|\
| * 7fffcc8 adding
* | 7277340 adding
|/
* 39c29d9 Merge branch 'add-copyright' Raj
|\
| * de62fc3 adding line
| * 8746b9d Adding copyright notice
|/
* 218d0ee changes done to file
* cbb7ab4 commit all
* 632f909 commit
* 8637d7a 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
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch
big
* master
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch -d big
Deleted branch big (was 7ffb2d1).
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git branch
* master
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git pull origin master
From https://github.com/rajkumargupta14/hello-world
* branch master -> FETCH_HEAD
Already up to date.
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 289 bytes | 144.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/rajkumargupta14/hello-world.git
01e33a7..0199c9d master -> master
Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$