Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

git - 使用Git版本控制查看文件的更改历史记录(View the change history of a file using Git versioning)

How can I view the change history of an individual file in Git, complete details with what has changed?

(如何在Git中查看单个文件的更改历史记录,完整的详细信息?)

I have got as far as:

(我有:)

git log -- [filename]

which shows me the commit history of the file, but how do I get at the content of each of the file changes?

(它显示了文件的提交历史记录,但是如何获取每个文件更改的内容?)

I'm trying to make the transition from MS SourceSafe and that used to be a simple right-clickshow history .

(我正在尝试从MS SourceSafe进行转换,而这曾经是一个简单的right-clickshow history 。)

  ask by Richard translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For this I'd use:

(为此,我会使用:)

gitk [filename]

or to follow filename past renames

(或者按照文件名过去重命名)

gitk --follow [filename]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...