Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to 'git push' to a repo that was cloned as read-only onto my team's staging server

I cloned a repo using its GitHub read-only URL onto my team's staging server. I made some changes there to the config files.

I'd like to change the repo clone on the server to be read-write, so that I can 'git push' the config file changes.

How do I do this?

Or is there a better 'best practice' way to deal with this scenario than committing from the staging server?

like image 530
coffee-grinder Avatar asked Aug 17 '10 00:08

coffee-grinder


People also ask

Can you clone a repo and push to another?

Cloning a repository syncs it to your local machine. After you clone, you can add and edit files and then push and pull updates. This article refers to the command line.


1 Answers

open up .git/config in your favorite text editor and change the remote url to the read+write url that github shows you.

like image 82
jshen Avatar answered Sep 24 '22 19:09

jshen