Question: I have created new branch from `master` and then another branch from new one:

```
master --> A --> B

```

Later I found out that some things should be fixed on branch `A`, so I went back there and maid those changes. Can I push those changes to branch `A` and later merge them with branch `B` (I know that I could make those changes on branch `B` directly, but I have made a mistake checking out branch `A` and now changes are here...) or should I create another branch from branch `A` and push those changes to that branch and later merge it with branch `B`?

```
master --> A --> B 
           |         
            ---> C 

```

If both ways are possible, what would be the difference between them, is one way better then the other?

Answer: 
* If no commits are made to branch `B` yet, you can simply make the fixes required on branch `A` and then merge it to branch `B`. This will not show a merge commit as there will be no commits on branch `B` to merge.
* Although, if there are commits made to branch `B`, you can either create a temporary branch (eg. `C`, `hotfix`) from branch `A`, then merge it with `A` and `B`, else you can directly make commits to branch `A` then merge with `B`. 
Both these ways are correct, if the fixes are small, then you can directly commit on `A`, else make a new branch and go ahead.
You can make changes in branch A and then rebase branch B.
Here is the information on how to rebase :
<https://git-scm.com/book/en/v2/Git-Branching-Rebasing>