M
M
mrSeller2020-07-07 18:12:53
git
mrSeller, 2020-07-07 18:12:53

How to push file changes from a commit of one branch to a commit of another branch?

I usually use the console, but for this case I downloaded gitkraken and did not find such functionality there.

There is a feature/aaa branch that has commit 111 that has changes to some file
There is a feature/bbb branch that has commit 222

How do I drag these FILE changes from commit 111 to commit 222?
(I expected that I would open the gitcraken interface and literally drag and drop the changes to another commit)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
necrodeflorator, 2020-07-07
@necrodeflorator


Ctrl+c , ctrl+v

E
Egor Zhivagin, 2020-07-08
@Krasnodar_etc

There is no direct tool in the git for such things. This is a very strange task)
So just go to another branch, copy the changes, paste into the desired one. If you want to have just one commit, then you:
1 -- commit the migrated changes
2 -- rebase -i
3 -- squash the last commit with the migrated changes (create a new commit based on two merged old ones)
Will only work if commit 222 is the last one in your branch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question