I am new to working with git and SourceTree, so I need some help. A few information up front: I work together with another collegue on a shared git repository. I made some changes to some files and then commited my changes. When I wanted to push my commits, my colleague had already pushed some other changes, but I didn't pull them before I tried to push myself. So Sourcetree opened up another branch. I wasn't sure how to merge the new branch with my local head without losing my own changes, so I tried out a lot of things including stashing and resetting commits. Now I am pretty much clueless what to do to get everything back to normal without losing my changes. Here is a photo of the current status:
Thanks for your help.
You could try interactive rebasing or squashing.
Alternatively you could delete that 'extra' branch after selecting them and using the "Create Patch…" (From Commits). Then you can just re-apply them on a version clone without any worries beyond the change in metadata.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs