0

I am a new user of GIT and just installed it in our workplace. I have my repository on my workstation and also my folder that is to be tracked. Repository is C:\MY_REPO and the folder for doing code changes is C:\MY_FOLDER.

There are 3 files, F1, F2, F3 in the MY_FOLDER.

I made change to F2.

git add F2 
git commit

So now I assume that F2 - version 1 is in MY_REPO

I made another change to F2 - version 2, in MY\FOLDER followed by git add and git commit.

WHAT I WANT to do is to get F2 - version 1 from MY_REPO back into MY_FOLDER.

I cant get the git fetch command to do it.

Any advice?

Liam
  • 27,717
  • 28
  • 128
  • 190
Jsk
  • 51
  • 1
  • 5
  • Possible duplicate of [How do I pull from another computer's repository in Git?](https://stackoverflow.com/questions/4131164/how-do-i-pull-from-another-computers-repository-in-git) – Liam Sep 06 '18 at 12:57
  • You need to configure your remote before you can fetch – Liam Sep 06 '18 at 12:57
  • Better target actually [Git pulling changes between two local repositories](https://stackoverflow.com/questions/5775580/git-pulling-changes-between-two-local-repositories) the answer is the same though, configure a [`remote`](https://git-scm.com/docs/git-remote) – Liam Sep 06 '18 at 12:59
  • Possible duplicate of [Git pulling changes between two local repositories](https://stackoverflow.com/questions/5775580/git-pulling-changes-between-two-local-repositories) – phd Sep 06 '18 at 14:46
  • I understand that I need to do a git remote. My remote/central repository is on C:\REPO_FOLDER. My command then should be 'git remote add origin c:/REPO_FILDER/.git ? – Jsk Sep 07 '18 at 13:42

0 Answers0