User Tools

Site Tools



Clone a specific folder

This is called sparse checkout.

  • Clone repo.
  • Enable sparse-checkout
  git config core.sparseCheckout true
  • Specify folder for sparse checkout
   echo "MY_FOLDER" > .git/info/sparse-checkout
  • Checkout the branch
  git checkout master

Baremetal repository

Allows to create a git repository in a folder.

git init --bare <directory>

Create a new git from a directory from another git

This tip allows to create a new repository from a folder from another git repository, end keep all the changelog and tags.

For keeping tag, on step 2.4, git pull repo-A-branch master –tags And don't forget to push tags after that.


git.txt · Last modified: 2016/10/05 14:31 by louisbob_ext