How can I view branches and file changes using git log?

As Andy answered - this info is not kept. If you will think about it it will become pretty clear that this information is not necessary at all. In git as in distributed VCS there is no point of knowing how another developer called his branch before the code got merged into the mainline.

What is the point of knowing it? Does it really help? As for the other part of the question you can see the list of files changed between two points in history using git whatchanged or git log --stat.

I suppose the main reason I would want to know the branch name is that I often give short, two or three word descriptions of the work I was doing as the name of a branch. So it would be nice to see it because I can quickly tell why those changes were committed. As for the --stat switch, I should have read the man page more carefully but that's exactly what I was looking for.

Thanks! – David Sanders Aug 2 at 20:58 if you really really need to know the branch name - you probably could look at the pre-commit hooks. You could put a script in place that will prefix all your new commit messages with the branch name you're currently having checked out.

Then "git log --one-line" would do the trick. – Eugene Sajine Aug 15 at 19:21.

You can't do that with git. It doesn't keep track of the branch the commit was made to, so once you delete the branch, git has no idea that it ever existed.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions