GIT

Review Changes (GIT)

Whenever you add and changes files in git always keep in mind to see the git changes it is also good practice to review changes in git. Reviewing the changes is good you should every time review  changes before commit your changes. Git log command is very popular command to view your changes before commit.

Git Log Command

Follow the below command to to review your changes:

# git log
commit 2693680838b83a37d2e81cd9aae5c54785b6ed52 (HEAD -> master)
Author: Santosh
Date:   Wed Sep 1 06:34:06 2021 +0530

    Updated Login Page

commit 9e42b8c992cf7d7e3662ea486da64950f2f448f3
Author: Santosh
Date:   Wed Sep 1 06:33:18 2021 +0530

    "Added Document PDFs"

From the above command you can find the recent commit in the log on the top, now using the commit ID you can view the more details of the specific commit ID.

GIT Show Command

Git show command will help you to see the more details of the commit ID. You can use this command to check more details.

# git show 9e42b8c992cf7d7e3662ea486da64950f2f448f3
commit 9e42b8c992cf7d7e3662ea486da64950f2f448f3
Author: rahul 
Date:   Fri Sep 1 06:33:18 2017 +0530

    Added Document PDFs

diff --git a/Documents/1.pdf b/Documents/1.pdf
new file mode 100644
index 0000000..e69de29
diff --git a/Documents/2.pdf b/Documents/2.pdf
new file mode 100644
index 0000000..e69de29
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..e69de29

FAQs

Question 1 : How do I review changes in git?

Answer : You can use git log command to review  the changes.

Question 2 : How to resolve changes in git hub?

Answer :

  1. Go to pull request tab and click Files changed.
  2. Now in the changed code, click Review changes.
  3. After that type a comment summarizing provide your feedback on the proposed changes.
  4. Then select the type of review what you want and.
  5. Click Submit review.

Question 3 : How can I see my commit changes?

So if you want to see your commit changes you can use git log command. You will get the latest commit in the top in the output.

Question 4 : How can I review my last commit in git?

If you want to see your last commit in git, you can use git log –pretty=online to see the last commit if there are too many commit to review.

Question 5 : How to check git logs?

You can check your logs using git log command or you can your online options with –pretty like : git log –pretty=online.

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment