git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
[package] | |
name = "clap_prompt_example" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
clap = { version = "3.1", features = ["derive"] } | |
dialoguer = "0.10" |
git checkout --orphan onetime | |
git add -A | |
git commit -m "Initial commit" | |
git branch -D main | |
git branch -m main | |
git gc --aggressive --prune=all | |
git push -f origin main |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
sudo killall -HUP mDNSResponder |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |