You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I must admit I'm a novice in Bitbucket and in Git in general. I'm using Sourcetree and working in a repository in Bitbucket.
I'm working with a plugin within a videogame project, for which I am the only responsible of. For the record, the game engine is Unity and the plugin is FMOD (an audio middleware). I'm the only one modifying the relevant files of the plugin (the FMOD project and the audio banks) within Unity.
I have a separate branch for my work with the plugin. There have been changes made into my branch, with a new version of the app for testing. I don't know what I've done, but at this point:
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.
fatal: cannot do a partial commit during a merge.
Pushing to https://bitbucket.org/foo/bar.git
= [up to date] Production-MVP -> Production-MVP
! [rejected] FMOD -> FMOD (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/foo/bar.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
It looks I've started a merge, but I don't know how and how to get out of this.
What I want is to accept any change made by the developers, except from the relevant files for FMOD, which I believe they did not touch (aside maybe for some caches and such), and push my changes for the relevant FMOD files. For a complete noob in git, bitbucket and sourcetree, how do I make this?
Hello @Saxea _Flowie_
Thanks for your hint. I did that, and this is what I get:
On branch FMOD
Your branch and 'origin/FMOD' have diverged,
and have 1 and 141 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
and then I get a bunch of files in green (new and modified files).
Then I get this
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(use "git add <file>..." to include in what will be committed)
It suggest me to "git commit", but this still throws an error (haven't tried in Terminal, but in Sourcetree GUI it does, as I pointed out before)
Nice! I suggest taking a short tutorial on git basics so you become more familiar with the common scenarios, otherwise it can be very frustrating. I said that from my own experience :).