Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting a Github repo to another language

Tags:

git

github

I'd like to port someone else's repo to another language. In my case: SCSS -> Stylus, but it could easily have been Javascript -> Coffeescript.

What is the best way to go about this? Should I:

  • Fork the repo and edit the files, without the intention of pull requesting. Here I'd only be forking to maintain the link between the two so that I could pull updates in the future.
  • Start a new repo, setup the remote to the original, pull and then edit the files.
  • Something else?

Also, what is the best way to continue updating the new language repo?

Ideally, I'd be able to diff my original CSS copies against the new changes to the main repo's CSS, and then change my Stylus files accordingly. Is there an easy way to do this?

like image 794
Ian Storm Taylor Avatar asked Sep 02 '25 14:09

Ian Storm Taylor


1 Answers

Because you want to track it over time, I would probably fork the existing repo and then do the changes in a separate branch ("rewrite-for-foo"). Because that way when you check out the master again and can look through the recent changes and diff history, you can easily see what you need to apply to the rewrite. And more importantly, you may actually want to keep at least some of the original files in your new distribution, such as documentation, configuration files, etc. By forking and using branches you can track the few changes you do want from the original distribution better.

like image 135
Wes Hardaker Avatar answered Sep 05 '25 02:09

Wes Hardaker