In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Git how to view the revision history, many novices are not very clear, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Git to view the modification history of the method: 1, the use of "git log-pretty=oneline file name" command to view the modification history of the specified file; 2, the use of "git show commit hash value" to view all the modified content of commit.
This article operating environment: Windows10 system, Git2.30.0 version, Dell G3 computer.
How does git view modification history
Sometimes when comparing the code, I see some changes, but I don't know the author and reason of the change, and I don't know the corresponding BUG number, that is to say, there is no way to find out the specific reason for these changes.
[note]: a file can be changed for a limited number of times, and each submission of code modification will be described by commit. We can start here.
Switch to the directory
First change to the directory where the file you want to view is located:
Cd packages/apps/Mms/src/com/android/mms/ui/
2. Git log-pretty
Then use the following command to list the history of all changes to the file. Note that here we focus on a specific file, not the git library. If it is a library, there are a lot of changes.
Git log-- pretty=oneline file name
III. Git show
As shown above, what is printed is the history of all the changes to the file MessageItem.java. The long string of numbers at the front of each line is the hash value formed by each submission, and then you can use git show to display the specific changes.
Is it helpful for git show 356f6def9d3fb7f3b9032ff5aa4b9110d4cca87e to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.