Is there a way in SourceTree to compare one given file between two branches?
Using a command line, it would be:
git diff <one_branch> <another_branch> <my_file>
You can select any two commits (using CNTRL-click or CMD-click) to do a diff between them. The just select the file from the list in the lower left corner that you want to see the differences on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use Control-click (or Command-click) on a Mac, you can select any two arbitrary commits and it compares between them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes: Please!
i am switching from cornerstone (svn) to sourcetree. what i really miss is an easy way to compare two versions of a file. cornerstone has a really great history/log view even on a single file.
markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See my accepted answer above - you can easily do this by selecting two commits at thes ame time (using CNTRL-click or CMD-click) and then selecting the file you are interested in in the lower left corner file listing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no way to do this form the SourceTree UI.
The closest you can get to this: You can use the "Log selected" option from the context menu that comes up when right-clicking a file name to display the history of the file in the current branch. Within this, if you select two states, it gives you a diff between them. Unfortunately, this only works within one branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick answer. Generally speaking, I really miss in SourceTree a "Diff..." menu, allowing to compare the selected file to another commit/tag/branch of that file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The same thing seems to work between branches as well in the File history window of Git Extensions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.