0

I'm trying to checkout items from a different git branch. I did fetch , then checkout and it said "up-to-date" , But where exactly that I see the "l02" ?

me@appliance (~/temp/mydir): ls
l01
me@appliance (~/temp/mydir): git fetch
git me@appliance (~/temp/mydir): git checkout l02
Already on 'l02'
Your branch is up-to-date with 'origin/l02'.
me@appliance (~/temp/mydir): ls
l01 
JPC
  • 5,063
  • 20
  • 71
  • 100

2 Answers2

1

If you are already at the branch you want, you need to use

$ git pull

This will apply a git fetch and a git merge

See What is the difference between 'git pull' and 'git fetch'?

Community
  • 1
  • 1
rcmgleite
  • 1,303
  • 1
  • 18
  • 22
0

Try git pull instead of Fetch (it merges the changes)

Anthony N.
  • 295
  • 3
  • 16