Showing posts with label Version Control. Show all posts
Showing posts with label Version Control. Show all posts

Monday, 29 July 2019

Common git issues and their solution

While using git, I faced some small issues and found their solution online. Here is the consolidated list.

1. Refusing to merge unrelated histories.
Command : git pull
Error : fatal: refusing to merge unrelated histories
Solution : git pull --allow-unrelated-histories

2. There is no tracking information for the current branch.
Command : git pull
Error : There is no tracking information for the current branch. Please specify which branch you want to merge with.
Solution : git branch --set-upstream-to=origin/master master

3. Not a git repository.
Command : git remote add origin https://github.com/jagdevsingh87/ATG-REST-case-study.git
Error : fatal: not a git repository (or any of the parent directories): .git
Solution : git init