Introduction
Welcome to MikesBlogDesign! This beginner-friendly guide walks you through creating a GitHub repository, syncing it with GitHub Desktop, connecting to Netlify, and deploying your site. Whether you're launching a portfolio or a blog, this tutorial has you covered.
Prerequisites
Step 1: Create a New GitHub Repository
- Log in to GitHub.
- Click the + icon in the top-right corner and select New repository.
- Fill in the details:
- Repository name: Choose a unique name.
- Description (optional): Add a brief project description.
- Public/Private: Decide visibility.
- Initialize with a README (optional): Check for a starter README.
- Click Create repository.
Step 2: Install and Set Up GitHub Desktop
- Download GitHub Desktop for your OS.
- Install the application.
- Open GitHub Desktop and sign in with your GitHub account.
- Configure Git:
- Go to File > Options (Windows) or GitHub Desktop > Preferences (Mac).
- Set your name and email for commits.
Step 3: Clone the Repository
- In GitHub Desktop, click File > Clone repository.
- Select your repository from the GitHub.com tab.
- Choose a local path for the repository folder.
- Click Clone.
Step 4: Add Your Code/Files
- Open the cloned repository folder.
- Add your project files (e.g.,
index.html
, CSS, JS).
- Ensure your main file is
index.html
for Netlify.
- Return to GitHub Desktop to view changes.
Step 5: Commit and Push Changes
- Review changed files in GitHub Desktop’s Changes tab.
- Write a commit message (e.g., “Initial project files”).
- Click Commit to main.
- Click Push origin to upload to GitHub.
Step 6: Connect to Netlify
- Log in to Netlify.
- Click New site from Git.
- Select GitHub and authorize access.
- Choose your repository.
- Configure settings:
- Branch to deploy:
main
.
- Build command: Leave blank for static files or enter framework-specific command (e.g.,
npm run build
).
- Publish directory: Use
/
or your build folder (e.g., dist
).
- Click Deploy site. Netlify provides a unique URL.
Step 7: Automatic Updates
- Edit files in your local repository folder.
- In GitHub Desktop:
- Review and commit changes.
- Push to GitHub with Push origin.
- Netlify auto-deploys updates from the
main
branch.
Troubleshooting
- GitHub Desktop issues: Ensure files are in the correct folder.
- Netlify build fails: Check build settings and logs.
- No updates: Verify Netlify’s repository and branch settings.
Optional: Custom Domain
- In Netlify, go to Site configuration > Domain management.
- Add your domain and configure DNS.
- Wait for DNS propagation (up to 24 hours).
Conclusion
You’ve set up a GitHub repository, synced it with GitHub Desktop, connected to Netlify, and enabled automatic deployments. Share your live site with the world!
Start Deploying with Netlify
Further Reading