1

So I am trying to fetch one of my repositories into my project but the files are not updating on my local machine.

git fetch TheCore <-- my Core on Github
returns saying nothing in terminal, just puts me back at prompt

No files have updated on my machine, still has old code.

My as12 projects remote repos:

origin  https://github.com/mine/as12.git (fetch)
origin  https://github.com/mine/as12.git (push)
thecore https://github.com/mine/TheCore.git (fetch)
thecore https://github.com/mine/TheCore.git (push)

So I am trying to fetch TheCore so it will update my local project with new code. Not sure why fetch is not working.

jdog
  • 10,351
  • 29
  • 90
  • 165

2 Answers2

1

When you want your working directory to be updated, follow that git fetch with a git merge, or just use git pull instead.

More reading: What is the difference between 'git pull' and 'git fetch'?

Community
  • 1
  • 1
Matt Ball
  • 354,903
  • 100
  • 647
  • 710
1

Fetch only has the effect of updating the references on your local repository. It does not automatically update local branches. To update local branches you need to use pull, merge or rebase depending on the situation.

More info here

Community
  • 1
  • 1
sciritai
  • 3,688
  • 1
  • 17
  • 22