One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).
- Make sure you are in the right place
-
That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.
fatal: refusing to merge unrelated histories
-
That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error
-
- An easy way to check where you are is the command: