Git way -V

This will be a short update as the git repository for debutsav has moved from to

Due to few added resources (namely an issue tracker and a better-looking UI) the git repository was changed from to last week. Gitlab seems to be sitting between github and with the benefits of both. The source is open, the UI is better than gitorious and hopefully will soon be packaged for Debian. IF and when Gitlab comes to Debian, along with Gitolite the possibility of PPA’s for Debian will improve tremendously increasing both the responsiveness and the stability of the software within Debian a lot, but that is a story for another day.

Coming to the gitorious repository, as shared the forked repository is where we had our things. This is how the git remote looked :-

/games/shirishag75s-2014-mirror$ git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

But now, Praveen A, DD changed it to Gitlab so that all changes are done at Gitlab. While we could have number of scenarios with various complexity I’ll be doing the most simplest way so that students at Amritapuri, Kollam can do the same and contribute in adding more to the repository.

The first thing you would need to is open an account in Gitlab and either use the same ssh key or generate a new pair of ssh keys for Gitlab. Whether to use the same pair or not is upto you. Having the same key pair is good in the sense that the job is already done and you just have to copy paste. IF you want to generate a new pair you either delete the old key pair or generate the new key pair in a different place than ~/.ssh/ . You could have multiple sub-directories within the ssh directory having keys for different websites. Just make sure the name you use for the directory makes sense to you and are able to associate it with you git account at $whatever website/remote URL.

once you have pushed up your public key (either old or new, your job is mostly done). Fork the repository at , make sure the forked repository has a small name. For instance mine is at

Once this is done, your job is 90% done. The only thing left now is to change the remote URL’s at your end.

The command is :-

$ git remote set-url $keyword

Keywords can be anything, the first keyword is origin, apart from that you can have any name as keyword, just make sure that the keyword does not conflict or is confusing with the name of the project or something. It should be unique and make sense to you.

This is the first change I did :-

~/games/shirish-website14$ git remote set-url upstream

so I changed the upstream from gitorious upstream to the gitlab upstream. So now my list of git remotes look like :-

~/games/shirishag75s-2014-mirror$ git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

As can be seen I have changed the remote of upstream from gitorious to gitlab. Later I changed the origin too similarly so now it says :-

~/games/shirish-website14$ git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

That’s it my job is done, now I can sync up or offer any changes I want to. That is/was all that is needed to change remotes. You can have as many branches and whatever else you need in your remotes, the only precaution you should have if you have too many remotes added, document it somewhere for your own convenience.

If something is not understandable or unreadable, please let me know and I’ll try to make it simpler.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.