Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git add . Gives me Bus error (core dumped)

Tags:

git

I am using ubuntu and trying to put my code on github but when I tried using the "git add ." command , I got an error "Bus error (core dumped)".

joannah@joannah-Inspiron-N5040:~/Macerdo$ git init
Initialized empty Git repository in /home/joannah/Macerdo/.git/
joannah@joannah-Inspiron-N5040:~/Macerdo$ git add .
Bus error (core dumped)
joannah@joannah-Inspiron-N5040:~/Macerdo$ 

I will appreciate any help.

like image 410
Joannah Nanjekye Avatar asked Oct 29 '14 09:10

Joannah Nanjekye


2 Answers

This is how I solved this problem, assuming you can still run git diff:

  1. Generate a diff patch
  2. Remove repo
  3. Clone repo again
  4. Apply patch

git diff --patch > /tmp/patch.diff
cd ..
rm -rf my_repo
git clone <my_repo>
cd my_repo
patch -p1 /tmp/patch.diff
like image 196
ichigolas Avatar answered Sep 16 '22 18:09

ichigolas


For future reference .I solved this by creating a new folder and putting all my project files there and when I did a "git add ." and "git commit" it worked but I still do not know why the former failed to work. The good thing is at least I got a solution and moved on. That is most important. Thanks for the contributions.

like image 40
Joannah Nanjekye Avatar answered Sep 18 '22 18:09

Joannah Nanjekye