0

I am a bit new to git so I may misuse git terminology in the following... Searching for a an answer I only found cases, where a fork (that is: another repo on github or similiar) was created - which I don't want (yet). Or it least: This is the way I think I understood it....

What I want is: To clone a github repo of a project located on github onto my harddisk (already done). Makeing changes to that cloned repo and don't put those online (because they are highly experimental in this moment). And I want to be able to update my cloned repo with changes made to the mother/father original repo on github without overwriting my changes (by risking conflicts from time to time...).

Is this possible and how can I accomplish this?

  • you can just do `git pull` (assuming you are on master) if there are conflicts it will let you know – Eyal H Nov 09 '20 at 15:52

1 Answers1

0

There is no significant difference if you use a fork (different remote) or the original repository (origin) while synchronizing the remote changes to your local branch. What you are trying to achieve is a common git workflow routine and you can get it either by git pull command or git pull --rebase. The final outcome will be the same from your perspective - you will keep your local changes (commits) and you will be up-to-date with the remote changes at the same time. However, the history log can be slightly different. See the question if you want to dive into the details.

Marcin Kłopotek
  • 5,271
  • 4
  • 31
  • 51
  • You should either `git commit` before you call `git pull` or, if you don't want to commit your changes yet, you can do a `git stash` before `git pull` then `git stash pop`. – Marcin Kłopotek Nov 10 '20 at 11:57
  • Ah! Enlightenment! :) Thanks a lot! –  Nov 11 '20 at 12:10