Pushing your first git repository / project to Github

github

As we seen in our last two posts “How to create git repository in Github” and “Starting your first Git Repository” we created a local git repository with helloworld.c as source inside that repository, and we also created an empty git repository on github website. In this post we will push our already existing local … Read more

How to clone remote git repository which has git submodules ?

github

In our last post, we seen how to create a remote repository in github which actually uses git submodules to have one git directory inside another git directory. In our last post we created the repository at https://github.com/lynxbee/understanding-git-submodules , now lets try to clone the same as, As we can see with tree command, git clone … Read more

How to fix – fatal: Unable to create ‘.git/shallow.lock’: File exists.

Today while trying to clone big repository using “git fetch” we encountered following error, “fetching iteration / depth 2”remote: Counting objects: 4, done.remote: Compressing objects: 100% (2/2), done.remote: Total 4 (delta 3), reused 3 (delta 2), pack-reused 0Unpacking objects: 100% (4/4), done.Auto packing the repository in background for optimum performance.See “git help gc” for manual … Read more

Fixed : git error: inflate: data stream error (invalid distance code)

Recently somehow our git got corrupted and we couldn’t push our code to server and got an error as, “error: inflate: data stream error (invalid distance code)” and “error: corrupt loose object” When we tried below commands like “git gc –prune” or “git gc –aggressive –prune=now” or “git fsck” the error was shown as same … Read more

Solved git error – fatal: unknown index entry format 0x16700000

Recently we did one find and replace in our existing git using command mentioned at “Grep and replace string from source code using command in Linux” but this somehow broke our git and we got a following error when tried to do git status, Solution : This error can be resolved as, And now if … Read more

How to clone a large git repository

Recently, I needed to clone the ndk while downloading andorid source, ndk size to clone was more than 4GB and my internet speed 512KB, which could take around 20 hours to clone. And, as you know if for any reason, Internet disconnects before git clone is 100%, the entire git needed to be clone from … Read more