Vibestacks LogoVibestacks
Getting Started

Fork Your Own Repository

Learn how to move Vibestacks boilerplate code to your own GitHub repository when you can't fork your own repo. Three methods explained with step-by-step terminal commands.

Since you cannot fork your own repository on GitHub, the best way to move the boilerplate code from Vibestacks to your new project repository is to do it manually via the terminal.

Here are three methods, depending on how much Git history you want to keep.


SSH vs HTTPS

Before cloning, decide which protocol to use. SSH is recommended if you have it configured—it's more secure and doesn't require entering credentials for each push.

Check if SSH is configured
ssh -T git@github.com

If you see "Hi username! You've successfully authenticated...", SSH is ready. If not, you can set up SSH keys or use HTTPS instead.

Which should I use?

SSH - More secure, no password prompts, recommended for regular development. HTTPS - Works out of the box, requires authentication token for pushes.


Use this if you want the code but want your new project to start with a clean Git history. This is the recommended approach for most boilerplate use cases.

Clone the boilerplate

Clone Vibestacks into a folder with your new project name:

git clone git@github.com:your-username/vibestacks.git my-new-project
git clone https://github.com/your-username/vibestacks.git my-new-project

Remove the old Git connection

Enter the folder and remove the existing .git directory to disconnect from the original repository:

cd my-new-project
rm -rf .git

Initialize a new repository

Create a fresh Git repository and link it to your new GitHub repo:

git init
git remote add origin git@github.com:your-username/my-new-project.git
git init
git remote add origin https://github.com/your-username/my-new-project.git

Push the code

Stage all files, create your initial commit, and push to GitHub:

git add .
git commit -m "Initial commit from Vibestacks boilerplate"
git branch -M main
git push -u origin main

Clean Slate

This method gives you a fresh start with no previous commit history. Your first commit will be the entire boilerplate codebase.


Option 2: Keep History

Use this if you want to preserve all commit history from the original boilerplate. This can be useful for understanding the evolution of the codebase.

Clone the boilerplate

git clone git@github.com:your-username/vibestacks.git my-new-project
cd my-new-project
git clone https://github.com/your-username/vibestacks.git my-new-project
cd my-new-project

Point origin to your new repository

Update the remote URL to point to your new repository instead of the original:

git remote set-url origin git@github.com:your-username/my-new-project.git
git remote set-url origin https://github.com/your-username/my-new-project.git

Push the code

git push -u origin main

Note

This method only pushes the main branch. If the boilerplate has multiple branches you need, use the Mirror method instead.


Option 3: Mirror (Exact Duplicate)

Use this if you want to move every single branch and tag from the boilerplate to your new repository. This creates an exact copy.

Create a bare clone

A bare clone contains only the Git data without a working directory:

git clone --bare git@github.com:your-username/vibestacks.git
cd vibestacks.git
git clone --bare https://github.com/your-username/vibestacks.git
cd vibestacks.git

Mirror-push to the new repository

Push all branches, tags, and refs to your new repository:

git push --mirror git@github.com:your-username/my-new-project.git
git push --mirror https://github.com/your-username/my-new-project.git

Clean up and clone normally

Remove the temporary bare clone and clone your new repository for normal use:

cd ..
rm -rf vibestacks.git
git clone git@github.com:your-username/my-new-project.git
cd ..
rm -rf vibestacks.git
git clone https://github.com/your-username/my-new-project.git

Pro Tip: Use Template Repositories

For future projects, you can avoid this manual process entirely by using GitHub's Template Repository feature.

Enable template mode

  1. Go to your Vibestacks repository on GitHub
  2. Click Settings
  3. Check the box labeled Template repository

Create new projects easily

Now, whenever you visit the repository, you'll see a green "Use this template" button. This allows you to create a new repository from the template—even if you're the owner of the original.

Best Practice

Template repositories are the cleanest way to spin up new projects from a boilerplate. They create a fresh repository with no fork relationship and a clean initial commit.


Next Steps

Once you've set up your new repository: