1

I have a problem with a git branch, I'm trying to switch on a different branch where there is some changed files and changed directories but I cannot see these changes on my local repository.

On the master I have:

dir1 / files

dir2 / files

on the branch I have

new_dir1 / files

dir2 / files

dir3 / files

When the command git fetch && git checkout myBranch I can see on the terminal

Checking out files: 100% (31012/31012), done.
Switched to branch 'featured_phase3'
Your branch is up-to-date with 'origin/myBranch'.

But the dir1 is not renamed to new_dir1 and the dir3 is not downloaded.

Sure I'm missing something because I'm new to git

Any help will be appreciate

Thxs

  • There is some kind of terminology misuse here, because `git checkout` does not "download" *anything*. The `git fetch` command does, but `git fetch` also (quite deliberately) does not affect any of *your* branches, and `git checkout` generally checks out one of your branches. Hence the full process for "download, affect my branch(es), and check them out" requires using `git fetch` followed by some additional command(s) other than *just* `git checkout`. (There are some exceptions because `git checkout` can do other things, but I'm working from your example here.) – torek Nov 19 '16 at 23:23

1 Answers1

0

Please refer to this answer. In short, you need to checkout your branch and then do a git pull

Community
  • 1
  • 1
zabeltech
  • 963
  • 11
  • 27