Adding as a remote to a local git repository, a pushable remote repository residing on a sshable server
Many people ask me how do I manage my work repositories since it is advisable to do all development on your PC and a headache to trace any change, from local repository to the test machine using scp or rsync each time a change is made. Fortunately, git has a easier way! The alternative is to add as a remote to a local git repository, a pushable remote repository residing on a sshable server. The steps are as follows:
//At the server's ssh
git checkout -b test #as we cannot push to a checked out branch at the server from our laptops.
//On my pc
git clone git/url/to/some_project.git
#Add pushable repo. which we inited on the server, as a remote to this local repo.