Amdadul Haque
Posted on November 20, 2024
Are you working on a front-end project for clients? The client set up a github repository and you need to push the code in that repo. Do you want to see a preview of how it looks on the live site? Here is a solution where you can set up another repo in your personal github account and host it for free in vercel or netlify.
Add remote repo
We know that we use
git remote add origin <url_to_our_github_repo>
here the origin
word is kind of a key and name to keep in mind for the github repo we have added.
So we can add another remote repo and then we need to select another name for that remote repo, lets have we choose a name dev
so the command will be
git remote add dev <url_to_another_github_repo>
Push
For pushing to remote repo (origin)
git push origin main
dev repo
git push dev main
💖 💪 🙅 🚩
Amdadul Haque
Posted on November 20, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.