Regarding the Git workflow, we create a branch from the master, which we use for a particular sprint, and each work item in this sprint branch from it. So the branch / merge stream would be like this:
master | \ | sprint42________ | | \ \ | | item1 item2 | | ___/ / | |/ / | | _________/ | |/ | _____/ |/ |
Now, in this thread, it turns out that the changes I made to one of the files in item1 should also be done in item2 (think about the utility to which I added a convenient function).
So, in accordance with the accepted answer to this question , I checked the item2 branch and continued to pull out the utilities file from the item1 branch, as follows:
git checkout item2 git checkout item1 utilities.xyzzy
However, when checking the git status it seems that this file was placed in the staging area, while I thought it would be more reasonable to consider it as a recently modified file:
pax> git status On branch item2 Your branch is up-to-date with 'origin/item2'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: utilities.xyzzy
Why was this done? How can I, by pulling a file from another branch into my current branch, get it just a modified file, which I will become ready?
source share