set -e
cd /source
git clone --depth 1 https://github.com/named-data/ndn-cxx.git
pushd ./ndn-cxx
git checkout -b release-build ndn-cxx-0.3.3
./waf configure
./waf
./waf install
popd
rm -rf ./ndn-cxx
I am running the above mentioned script, but getting the error: "Cloning into 'ndn-cxx'... /source/ndn-cxx /source fatal: Cannot update paths and switch to branch 'release-build' at the same time. Did you intend to checkout 'ndn-cxx' which can not be resolved as commit?"
By default, if you specify the --depth
option, git will only fetch the master branch, so you won't be able to checkout to any other branch.
You can write the following :
git clone --depth 1 <url> --single-branch --branch <branch>
to retrieve the latest version of <branch>
instead, like this:
git clone --depth 1 https://github.com/named-data/ndn-cxx.git --single-branch --branch ndn-cxx-0.3.3
You won't have to do a git checkout
after the clone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With