I'm working on one branch and there's a particular file on another branch that I'd like to pull in but I can't easily find the LATEST version of that file. I can sometimes find SOME version of it and when I do that and right-click to log, I see the history of that file up to the commit where I found it but that doesn't tell me if there's a newer commit of that file.
The "Find" mechanism doesn't seem to have a way to find an actual file by its name. It only seems to let you search by commit message, SHA and other such things.
What am I missing?
First select the latest commit in the top part, then switch to the File Status tab (bottom, middle), then on the top, change "Show Pending" to "Show All". This gives you the list of the current files. Right clicking here and selecting log/blame will give you history up to the last state.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This only works on current checked out branch. I need to be able to find a file that is in a different branch without checking that other branch out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know, this above is the closest you can get with SourceTree. You will see everything that happened in branches merged to master (or the one you are looking at), but not stuff that happened in "parallel" branches.
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.
As far as I know, you've got three options for getting a file from one branch to another.
1) Merge the branches. This will merge all files, so it probably isn't what you want.
2) Cherry pick. This would need to be done for each and every commit that has effected the file in question, which is likely to be tedious.
3) Checkout the other branch, copy the file in question somewhere (will be the latest copy from that branch), checkout your original branch, and copy the file back in (overwrite what is there). Then commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The command line option
git log --all -- somefile
does it.
There should be a SourceTree equivalent
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.