Coder Social home page Coder Social logo

Comments (2)

frgomes avatar frgomes commented on June 29, 2024

I think you've found a bug.

It works if I do not specify a target folder:

$ git_sparse_checkout http://github.com/frgomes/bash-scripts master -- bin/git_sparse_checkout
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/rgomes/tmp/bash-scripts/.git/
warning: redirecting to https://github.com/frgomes/bash-scripts/
remote: Enumerating objects: 271, done.
remote: Counting objects: 100% (271/271), done.
remote: Compressing objects: 100% (232/232), done.
remote: Total 271 (delta 88), reused 111 (delta 33), pack-reused 0
Receiving objects: 100% (271/271), 116.62 KiB | 2.05 MiB/s, done.
Resolving deltas: 100% (88/88), done.
From http://github.com/frgomes/bash-scripts
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
branch 'master' set up to track 'origin/master'.
Already on 'master'

... but fails if I do:

$ git_sparse_checkout http://github.com/frgomes/bash-scripts master /tmp -- bin/git_sparse_checkout
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /tmp/.git/
fatal: not in a git directory

from bash-scripts.

DrCWO avatar DrCWO commented on June 29, 2024

Thank you for validating this and show me a way it works :-)

from bash-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.