fatal: refusing to merge unrelated histories

When you already have some thing in your git repo for example you created a git repo on github with readme file and then tried to push your local code first time to that github repo. So github repo already has a commit, it will force you to first pull it to your local code […]

Adding local code to github

Github is a great source of sharing your code with other developers. It allows you to create free repositories online. Follow the steps below to create a repo on github and upload your code to that repo to make it public Go to GitHub and create account there or login. Create a new repo by hitting the […]

Setting up git on local system

Developers often need to set a local git repository or local git server where you can save versions of your code. Here is a way to go. Step-1: create git repository on server We are going to setup git server on local machine. So first need to set the repository. $ cd /var $ mkdir git […]

Git pull without password

Git every time asking for a password? Frustrated of entering password every time you pull or push git? Don’t worry there is always a smarter solution. You can use ssh keys to store your ssh key on the server where git is stored and then it will never ask you again for password. Here are […]

Git error out of memory, died with strange error

To resolve errors like warning: suboptimal pack – out of memory fatal: Out of memory, malloc failed) error: pack-objects died with strange error Please assign git memory more i.e 128 or 256 with following command git config –global pack.windowMemory 256m this will allocate more memory to git and it will run smoothly.

Repair git

Git recovery/repair is very easy just try commands below git init git fsck git gc –auto git reset –hard these above steps also fix git errors like *** Error in `git’: corrupted double-linked list: 0x09c45208 ***