annadraw.blogg.se

Git checkout tag without clone
Git checkout tag without clone







If a branch or tag name is used instead, then checking out a specific commit of the main project doesn’t necessarily pin the whole build to a specific point in the life of the external project.

git checkout tag without clone

Using a specific git hash ensures that the main project’s own history is fully traceable to a specific point in the external project’s evolution. This can result in a significant speed up if many external projects are being used. If the local clone already has the commit corresponding to the hash, no git fetch needs to be performed to check for changes each time CMake is re-run. In general, however, specifying a commit hash should be preferred for a number of reasons: This ensures that if the remote end has its tag moved or branch rebased or history rewritten, the local clone will still be updated correctly. origin/myBranch rather than simply myBranch). Note that branch names and tags should generally be specified as remote names (i.e.

#Git checkout tag without clone how to

Also the Upstream Branch does not seam to be set.Ĭan you help me how to checkout the latest commit of a specified branch?

git checkout tag without clone

When running this code the checkout git repo is much bigger than the manually cloned Repo. Now the problem is, I do not want to checkout a specific tag but the latest commit of a specified branch. #Commands are left empty so that we only checkout the source and no not perform any kind of build I’d like to use this to clone and checkout a git repository include(FetchContent)įunction(CloneRepository repositoryURL branchName projectName sourceDir)







Git checkout tag without clone