1.2 KiB
1.2 KiB
git remote add private http://gitea.damconsulting.net:3000/peskyadmin/DAM-static-site.git
- Check Your Current Remote Since you’ve cloned a project, it already has one remote configured (usually named origin). You can verify this by running: bash
git remote -v
This will show the URL of the public repository you cloned from (e.g., https://github.com/user/public-repo.git).
- Add a Second Remote To push to your private repository, you need to add it as a new remote. Let’s call it private. Run: bash
git remote add private http://gitea.damconsulting.net:3000/peskyadmin/DAM-static-site.git
git remote -v
shows remotes
- Pull from the Public Remote To keep your local repository updated with changes from the public remote, use: bash
git pull origin main
Replace with the branch you’re working on (e.g., main or master). This fetches and merges updates from the public repo into your local branch.
- Push to the Private Remote After making your changes locally and committing them (with git add and git commit), you can push them to your private repository: bash
git push private main
This sends your commits to the specified branch in your private repo, not the public one.