1

Is it possible to download only a sub directory from a git repository?

Or download a specific commit's state?

I read about tags, but the repository which I would like to download does not have any tags...

tmsblgh
  • 517
  • 5
  • 21

1 Answers1

1

Since it looks like you have two separate questions, I think I can address both.

1.) Download only a subdirectory from a git repository

git fetch
git checkout HEAD directory/subdirectory

2.) Download a specific commits state

You can do a hard reset using the commit id. (a hard reset will discard any local changes and bring your repo back to the state of that commit)

git reset --hard {commit_id}
Keif Kraken
  • 9,500
  • 1
  • 10
  • 12