0

Image of my Sourcetree

Possibly too much information - also this is for an Angular 6 application:

In a dumb attempt to avoid hassle I emailed some code to a teammate, which he combined with his own code and pushed to the branch IndexerUI_Merge (in picture). This branch was then merged into IndexerUI_Upgrade, from which all teammates then pulled into their local branches, which should be feature branches off the original IndexerUI_Upgrade and we are using for each of our individual work.

Then within VSCode there were some conflicts I had to resolve locally, then everything was working locally. Now that I have more changes, I want to push to my remote feature branch - feature/a626461_CB2 - but all push attempts don't show up in the remote and Sourcetree is adding the commmit to whatever is going on with HEAD at the top of the image.

Running git status within provided Sourcetree terminal gives:

"rebase in progress; onto df3b939 You are currently rebasing branch 'feature/a626461_CB2' on 'df3b939'. (all conflicts fixed: run "git rebase --continue")"

The df3b939 seems to refer to the merge commit.

When I was committing my changes I had the correct branch selected on the sidebar, but on the File Status tab the "Push changes immediately to -" ends in just that dash. So I just made the commit, selected Push from the toolbar, selected the local branch feature/a626461_CB2 and the corresponding remote, and pushed.

This resulted in the top node in the picture, with comment "Basic component..." etc. I am confused because if Sourctree was detecting file changes and the terminal says I am on the right branch, why is this happening?

Any help fixing this would be greatly appreciated.

1 Answers1

0

I had unknowingly chosen the rebase option when pulling, but I had never done git rebase --continue as described here:

"You are not currently on a branch" error when trying to sync fork with upstream repository

As I had already made commits I followed advice here: Forgot "git rebase --continue" and did "git commit". How to fix?

And then iterated through git rebase --continue a couple times and merging conflicts with pervious commits each time after the rebase command. After that, the remote and my local were considered diverged, so I pulled my remote into local and resolved conflicts - in my case accepting everything on my local only.

Now everything is working. Although for posterity I noticed that many files still had weird "<<<<<