git clone -n NAME is broken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| remram@vebian:~$ git init a | |
| Initialized empty Git repository in /home/remram/a/.git/ | |
| remram@vebian:~$ cd a | |
| remram@vebian:~/a$ touch a | |
| remram@vebian:~/a$ git add a && git commit -m a | |
| [master (root-commit) 1a19233] a | |
| 1 file changed, 0 insertions(+), 0 deletions(-) | |
| create mode 100644 a | |
| remram@vebian:~/a$ git tag -a 1.0 -m a | |
| remram@vebian:~/a$ cd .. | |
| remram@vebian:~$ git clone --single-branch -b 1.0 --no-checkout a b | |
| Cloning into 'b'... | |
| done. | |
| remram@vebian:~$ cd b; git branch | |
| * (no branch) | |
| remram@vebian:~/b$ cd ..; rm -Rf b | |
| remram@vebian:~$ git clone --single-branch -b master --no-checkout a b | |
| Cloning into 'b'... | |
| done. | |
| remram@vebian:~$ cd b; git branch | |
| * master | |
| remram@vebian:~/b$ cd ..; rm -Rf b | |
| remram@vebian:~$ git clone --single-branch -b 1a19233 --no-checkout a b | |
| Cloning into 'b'... | |
| warning: Could not find remote branch 1a19233 to clone. | |
| fatal: Remote branch 1a19233 not found in upstream origin | |
| fatal: The remote end hung up unexpectedly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment