Support for checkout (merge) files from other branches: git checkout <branch> <files>

Alireza 8 years ago updated by Robert 2 years ago 6
Satisfaction mark by Alireza 6 years ago

You should be able to check out every file in every repository state by selecting the commit in the Log, right-clicking the file and selecting Save As.

It wouldn't be possible if the file was not changed in the selected commit, so first I need to find the latest commit that changed the file, which can be cumbersome in case of multiple files.

Sure, just select the "View all files of the selected commit" icon above the Files view.

Additionally, if you want to edit the changes as you bring them in from another branch then choose "Compare with Working Tree..." from the right-click menu and then "Compare After" from the dialog.

Proposed workflow: Search for files in Files window and click "Checkout ..." in the context menu, then select branch

This is old, error-prone SVN style. Usually, you have to get the whole working tree at the state of a certain branch. That's what the normal checkout is for. But maybe I don't understand why you need this feature (so often) that you propose a more direct way than the current one.