view the change history of a file using GitHub.com
I've found this post about using command line, but am wondering if it is possible to view the file change history of a single file in a repo on GitHub.com? An in-browser solution would help me to better illustrate changes to team members while in meetings.
You can view the change history of a file by clicking on the history button, or by adding commits
to the url of the file. Here is what it looks like for a file at the homebrew repo on github:
https://github.com/mxcl/homebrew/commits/master/SUPPORTERS.md
To get a line-by-line history, simply add the sha string of the commit for which you want to see the diff to the url after the word commit
, and then anchor it with the filename you are interested in. For the same file above:
https://github.com/mxcl/homebrew/commit/288f001e924d5365b79c279e4478f372a04011ae#SUPPORTERS.md
As @BurhanKhalid say, but here explaining as a "github fast guide", with URL syntax:
https://github.com/<USER>/<PROJECT>
... https://github.com/<USER>/<PROJECT>/blob/master/<PATH>
https://github.com/<USER>/<PROJECT>/commits/master/<PATH>
PS: to remember "commits/master" click at the project's home in the "Commit" link.
Ops: there are a similar answer here, @TimHenigan expressed with http://github.com/<username>/<project>/commits/<branch>/<path/to/file>
Question to Github developers team
Why do you not offer a direct link for this kind of browsing? We need it, like Wikipedia readers need "history" link!
Ops, Github's team is listening to us?
Now (June 2014) when you browse through the folders, an icon appears, see "browse commits" above right. When you click, the tree/master
URL turns commits/master
.
Still missing to have the same for files , as showed here, but was an evolution.
Checkout out Little Differ in chrome webstore. It's a chrome extensions that shows a sidebar displaying the commit history of a repo or a file.
链接地址: http://www.djcxy.com/p/22668.html上一篇: git之间的区别