-1

I had a problem with git

Git fetch remote branch

This answer solved it, I needed to do

git checkout -t remotes/origin/branch-name

What does -t mean...?

I can't find any answers on google or here...

torek
  • 448,244
  • 59
  • 642
  • 775
kawnah
  • 3,204
  • 8
  • 53
  • 103
  • 1
    Each Git sub-command has *its own* flags. For `git checkout`, `-t` is short for `--track`, as [lyzlisa answered](https://stackoverflow.com/a/72279984/1256452), but for `git ls-files` for instance, `-t` is just `-t`, a semi-deprecated feature, and for `git ls-tree` it makes `git ls-tree` show tree objects (useful only when combined with `-r`). – torek May 17 '22 at 20:05

1 Answers1

3

You can get more information on a specific command using --help flag. In this case, git checkout --help would show you that -t is the shorthand form for --track.

lyzlisa
  • 439
  • 4
  • 6