Skip to content

Instantly share code, notes, and snippets.

@cpsievert
Last active August 29, 2015 14:16
Show Gist options
  • Save cpsievert/698c7f1404f972782e71 to your computer and use it in GitHub Desktop.
Save cpsievert/698c7f1404f972782e71 to your computer and use it in GitHub Desktop.

Travis uses --depth=50. If I want to checkout master, am I forced to re-clone here?

cpsievert@Carsons-MacBook-Pro:~$ git clone --branch=carson-travis-hook --depth=50 https://github.com/ropensci/plotly.git
Cloning into 'plotly'...
remote: Counting objects: 2510, done.
remote: Compressing objects: 100% (1253/1253), done.
remote: Total 2510 (delta 1225), reused 2277 (delta 1060), pack-reused 0
Receiving objects: 100% (2510/2510), 26.03 MiB | 1.49 MiB/s, done.
Resolving deltas: 100% (1225/1225), done.
Checking connectivity... done.
cpsievert@Carsons-MacBook-Pro:~$ cd plotly/
cpsievert@Carsons-MacBook-Pro:~/plotly$ git checkout master
error: pathspec 'master' did not match any file(s) known to git.
cpsievert@Carsons-MacBook-Pro:~/plotly$ git branch -a
* carson-travis-hook
  remotes/origin/carson-travis-hook
cpsievert@Carsons-MacBook-Pro:~/plotly$ cd ..
cpsievert@Carsons-MacBook-Pro:~$ rm -rf plotly/
cpsievert@Carsons-MacBook-Pro:~$ git clone --branch=carson-travis-hook https://github.com/ropensci/plotly.git
Cloning into 'plotly'...
remote: Counting objects: 5226, done.
remote: Total 5226 (delta 0), reused 0 (delta 0), pack-reused 5226
Receiving objects: 100% (5226/5226), 35.63 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (2819/2819), done.
Checking connectivity... done.
cpsievert@Carsons-MacBook-Pro:~$ cd plotly/
cpsievert@Carsons-MacBook-Pro:~/plotly$ git checkout master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
cpsievert@Carsons-MacBook-Pro:~/plotly$ git branch -a
  carson-travis-hook
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/add-r-cookbook-tests
  remotes/origin/appveyor
  remotes/origin/carson-scales-free
  remotes/origin/carson-travis-hook
  remotes/origin/contributors-guide
  remotes/origin/gh-pages
  remotes/origin/marianne-reinclude-test
  remotes/origin/master
  remotes/origin/slack_notifications
  remotes/origin/sync-up-version-nbers
  remotes/origin/toby-cookbook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment