Knowledge Base
Search
New article
Authentication is disabled (development mode).
Edit article
Title
Tags
Content
<pre><code class="language-bash">origin=https://... fork=https://... local=$(basename "$origin") local=${local%.git} git config --local --list | grep -q '^lfs.' && lfs=true || lfs=false git clone --bare "$origin" "$local" ( cd "$local" $lfs && git lfs fetch --all git push --mirror "$fork" $lfs && git lfs push --all "$fork" ) rm -rf "$local" git clone "$fork" "$local" cd "$local" git remote add upstream "$origin" git remote set-url --push upstream DISABLE</code></pre><h3>References:</h3><p><a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository">docs.github.com</a><br><a href="https://gist.github.com/0xjac/85097472043b697ab57ba1b1c7530274">gist.github.com/0xjac</a><br><a href="https://stackoverflow.com/questions/29952033/#answer-54600542">stackoverflow</a></p>
Save
Cancel