%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
Git Tutorial EclipseCon France 2014 - Git Exercise 05 - history view
1. Inspecting the History
In this exercise you will learn how to use the History View to inspect the revision history in a
repository.
History view
Preparation
Open the History View on your project by right-clicking on your project and selecting Show in
> History. You should see the revision graph of your repository
How to configure History view to your needs
This history view displays Author, date, Commit message and modified files of commits. The
history view has quite some options to configure which commits are displayed.
Depending on the use case you may want to …
a. … show only those commits which are reachable from the current branch. Hide all
commits on other topic branches.
b. … see only those commits which changed the selected resource (file, project,
subfolder) or it’s children. E.g. display only those commits which touched the
selected java file. The current selection is shown in the top right corner of the History
view.
2. c. … see only those commits which changed anything in the parent folder of the
selected resource (file, project, subfolder) or it’s children. E.g. display only those
commits which changed the same package as the selected java source.
d. … see only those commits which changed anything in the same project as the
selected resource or it’s children. Used when you are working in a repo which
contains multiple projects.
e. … don’t filter at all. Show all commits of the current repository
Options b), c) and d) are tied to the currently selected resource. Button g) allows that the
history view automatically updates when you change the selection.
Tipp: If you got lost with the different filters and the history doesn’t show what you expect set
it back to show everything. Therefore make sure that Show all branches and tags (a) is
turned on and Show all changes in repository (e) is selected.
Searching for Commits
Turn on Show Find toolbar f) and type in a search string in the Find field. You can select
where to search this string (in author or committer name, commit message, ID of the
change. The found commits are highlighted. You can combine this search with the filters
explained above.
Exercises
With the help of filters and search find out …
● … which commits have been done to package org.eclipse.example.calc.internal
● … who has done commit 92f83b4af8ef307e… and which files have been touched in
this commit
● … how many side branches are known which have commits changing Calculator.java
Actions on Commits
If you double-click on a file touched by a commit in history view you will get an editor with the
content of that file in that commit. If you turn on Compare Mode i) then and compare view
opens which compares the state of the file during that commit to the state in the previous
commit. This tells which lines have been changed by a certain commit.
Once you have selected a commit in history view the context opens offers a lot of operations
you can do on a commit.
● Create a new branch starting from the commit with id 51101ae160c684
● Compare commit 92f83b4af8e with the second last commit on your branch. Which
files are different in these two commits?
● Inspect commit a8c0e743721d81072de in the Commit Viewer. Get a single list of all
modifications done by this commit by switching to the Diff pane in Commit Viewer.
Commit Search
You can also search for commits from the Eclipse search dialog. From here it is possible to
extend a search over more than one repository.