Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

checkout a specific tag with git subtree

Can I use tags in subtrees? Following a specific issue:

I have a git repository which includes an external repository as a subtree. I could add this external repository and checkout a specific branch from this repo. With git subtree pull --prefix=<dir> --squash <remote> <branch> the update from the selected branch works well.

Now is it possible to checkout a specific tag? I couldn't find some information about tags in subtrees...

like image 814
moudi Avatar asked Dec 22 '15 08:12

moudi


1 Answers

Actually any reference should work. The man page for subtree displays this.

git subtree pull  -P <prefix> <repository> <ref>

Where <ref> can be a SHA, tag or branch. Basically anything git can resolve to a commit.

like image 190
crea1 Avatar answered Oct 02 '22 05:10

crea1