Tuesday, 27 August 2019

Editing files in Git by Raj Gupta


Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (master)
$ ls
'How to choose an AMI by Root Device Type'            'How to Install phpMyAdmin on LAMP server'                        'How to Secure the LAMP Server Database'
'How to host a WordPress Blog with in Amazon Linux'   'How to resolve InstanceLimitExceeded error of EC2 server'         raj.txt
'How to Install a LAMP Web Server on Amazon Linux 2'  'How to retrieve the System Logs of our EC2 Server by Raj Gupta'   README.md

Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (master)
$ vi raj.txt

Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (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:   raj.txt

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

Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (master)
$ git add raj.txt

Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (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:   raj.txt


Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (master)
$ git commit -m "added more information to file"
[master f5eb7aa] added more information to file
 1 file changed, 2 insertions(+), 1 deletion(-)

Administrator@EC2AMAZ-H8K4U2K MINGW64 ~/projects/Amazon-Web-Services-AWS-Cloud-Engineer (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

No comments:

Post a Comment