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
Next: Root
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
Hello,
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
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?
Many thanks
Probably a merge conflict.
Do a `git status` and this should give you more details.
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)
deleted: FMOD/Metadata/Event/{0cf32ce5-99c4-475c-8341-43c26548e437}.xml
deleted: FMOD/Metadata/Event/{1f486936-3ba9-4c36-8435-97abae43e129}.xml
modified: FMOD/Metadata/Event/{2ebb0065-18d1-4768-ab74-08b78e92080f}.xml
deleted: FMOD/Metadata/Event/{5f56eb27-cd6d-42ae-824b-ee5def1e5e25}.xml
deleted: FMOD/Metadata/Event/{86691b51-29b7-4840-9f9b-11c2175f74dd}.xml
Untracked files:
(use "git add <file>..." to include in what will be committed)
FMOD/Metadata/AudioFile/{471d1e58-b7c0-4dd5-8ee7-4f5b1a3e1330}.xml
FMOD/Metadata/AudioFile/{504dcad3-5b0a-4dc1-ad29-691a095fcfa2}.xml
FMOD/Metadata/AudioFile/{5b92ba40-82fb-44e9-9746-290341ae4da8}.xml
FMOD/Metadata/AudioFile/{87269cc0-1162-4351-bc69-bbddd1192285}.xml
FMOD/Metadata/AudioFile/{cecfafda-ca87-422c-a116-9d8b790bb835}.xml
FMOD/Metadata/AudioFile/{cfacb069-6990-4117-8bb5-36aaca60a3c9}.xml
FMOD/Metadata/DAWAsset/{002409ab-0e65-4de8-9c04-a10ba7ed6e36}.xml
FMOD/Metadata/DAWAsset/{040dae51-8621-42c2-b4b2-b3ddaa21a08e}.xml
FMOD/Metadata/DAWAsset/{064401c2-3a1b-4652-8e62-8628848caeef}.xml
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again! Your hint pointed me in the right direction! The problem was with the partial commit. It looks that I had some unstaged files. Staging them and committing worked, or so it seems!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! I did sone time ago, but lack of practice isn’t helping. I remember having problems in the past trying to roll back to a previous commit and things like that. Will follow your advice.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.