Question: I want to do this:

```
R, _ := strconv.Atoi(reader.ReadString(" ")) // reader = bufio.NewReader()

```

and the problem is, that strconv.Atoi expects one argument, but reader.ReadString() returns not only the string, but also the "err". Is there a way to solve this without creating variables or generally on just one line?

Answer: 
Yes, there has an easier way to copy all the files from a branch to another branch by git.

Assume copy all the files from `branchA` to `branchB`, then you can execute below commands (also can execute in IntelliJ idea termainal window):

```
git checkout branchB
git checkout branchA -- .
git commit -m 'copy files from branchA to branchB'

```
UPD. Since IntelliJ 2018.3, there is the Get action available inside the Compare with Working tree dialog.

Old reply:
Command-line git can do this, but it is not possible from the Compare branches in IntelliJ. There is a request to add mentioned functionality - please vote for <https://youtrack.jetbrains.com/issue/IDEA-95494>

As a workaround one could youse the Get action from a file Git history.

There is also a plugin to achieve this <https://plugins.jetbrains.com/plugin/10795-git-checkout-files-from-branch>