Skip to content

Instantly share code, notes, and snippets.

@sergeycherepanov
sergeycherepanov / script.sh
Created March 13, 2019 18:29
shallow update not allowed
Here's what I ended up doing - it worked perfectly. Note that I was moving from my old host (Bitbucket) to my new one (Gitlab). My comments are above the commands:
# First, shallow-clone the old repo to the depth we want to keep
git clone --depth=50 https://...@bitbucket.org/....git
# Go into the directory of the clone
cd clonedrepo
# Once in the clone's repo directory, remove the old origin
git remote remove origin