-1

I am having trouble merging binary code from the main branch. I do not care about the local version, so I am ok with discarding those changes.

git pull
warning: Cannot merge binary files: ee108_final_project.sim/sim_1/behav/xsim/note_player_manager_tb_behav.wdb (HEAD vs. 75189c1ef7fd720886f346ac04f7f89d459d3687)
error: The following untracked working tree files would be overwritten by merge:
        ee108_final_project.runs/.jobs/vrs_config_10.xml
Please move or remove them before you merge.
Aborting

I have tried removing but I get

git rm 'ee108_final_project.runs/.jobs/vrs_config_10.xml
fatal: pathspec ''ee108_final_project.runs/.jobs/vrs_config_10.xml' did not match any files

Not sure what else to attempt. I have tried other commands (git stash) but I get this:

>git stash
Saved working directory and index state WIP on main: 880bcda edited files?
Unlink of file 'ee108_final_project.runs/clk_wiz_0_synth_1/vivado.pb' failed.

How can I git pull? and hopefully choose the main version of the bit file instead of mine

Andy Lester
  • 91,102
  • 13
  • 100
  • 152
  • Short answer: never say `pull`. Say `fetch`. Now you are free to `merge` with full control. – matt Nov 30 '21 at 10:30

1 Answers1

0

There's 3 or 4 separate things happening here.

First, you have a binary file ee108_final_project.sim/sim_1/behav/xsim/note_player_manager_tb_behav.wdb which has changed, and git cannot merge it. After you fix the latter error, you need to address this.

You have a local untracked file ee108_final_project.runs/.jobs/vrs_config_10.xml, but git pull would bring a file with the same name from the remote. This is what is causing the current error.

git rm ee108_final_project.runs/.jobs/vrs_config_10.xml does not work, because your local ee108_final_project.runs/.jobs/vrs_config_10.xml file is not tracked. You need to do rm ee108_final_project.runs/.jobs/vrs_config_10.xml if you want to remove it. Note that this file is not under version control and if you remove it, you cannot restore it via git. After you have removed the file, you can try git pull again.

Lastly, git stash is failing: Unlink of file 'ee108_final_project.runs/clk_wiz_0_synth_1/vivado.pb' failed. - this is most likely because some program is locking the file in question. Try closing some applications that could be locking it before stashing.

1615903
  • 32,635
  • 12
  • 70
  • 99