├── README.md └── script.sh /README.md: -------------------------------------------------------------------------------- 1 | SMRT Git 2 | == 3 | 4 | Inspired by [MetroGit](https://github.com/vbarbaresi/MetroGit), which shows Paris' metro lines in the form of a Git commit history, I created a Singaporean version. This Git repository contains all the MRT stations in Singapore (excluding LRT). 5 | 6 | - They can be visualized in the GitHub network view: https://github.com/yangshun/smrt-git/network 7 | ![Imgur](http://i.imgur.com/ZUBRz0S.png) 8 | 9 | - Sourcetree: 10 | ![Imgur](http://i.imgur.com/Js00Ub7.png) 11 | 12 | - And other git commands and tools such as `gitk` and `git log --all --graph`. 13 | 14 | ### Generating the Commits 15 | 16 | Simply do: 17 | ``` 18 | $ ./script.sh 19 | ``` 20 | 21 | This script is incredibly meta. It wipes out the current git repository, adds itself and `README.md` to master, then proceeds to generate the commits on other branches. 22 | 23 | If you want to push to a remote repository, modify the remote at the end of `script.sh` and append `push` to the generation command: 24 | ``` 25 | $ ./script.sh push 26 | ``` 27 | 28 | The original SMRT map referred can be found here at http://i.imgur.com/1xM3bVC.gif. 29 | 30 | ![Imgur](http://i.imgur.com/1xM3bVC.gif) 31 | 32 | ### Contributing 33 | 34 | I hacked this out in a few hours and there might be bugs and discrepancies. Feel free to fork and submit patches! 35 | Would also love to hear your feedback on how it can be improved! 36 | -------------------------------------------------------------------------------- /script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start from a clean slate of Git 4 | rm -rf .git 5 | git init 6 | 7 | git add * 8 | git commit -m 'Add generation script and README' 9 | 10 | git branch EW-line 11 | git checkout EW-line # Start on EW-line from (2) 12 | git commit --allow-empty -m 'Joo Koon' 13 | git commit --allow-empty -m 'Pioneer' 14 | git commit --allow-empty -m 'Boon Lay' 15 | git commit --allow-empty -m 'Pioneer' 16 | git commit --allow-empty -m 'Lakeside' 17 | git commit --allow-empty -m 'Chinese Garden' 18 | git commit --allow-empty -m 'Jurong East' 19 | git branch NS-line 20 | 21 | git commit --allow-empty -m 'Clementi' 22 | git commit --allow-empty -m 'Dover' 23 | 24 | git checkout --orphan HarbourFront 25 | git commit --allow-empty -m 'HarbourFront' 26 | git branch NE-line 27 | git branch CC-line 28 | git checkout CC-line # Start on CC-line from (9) 29 | git branch -D harbourfront 30 | 31 | git commit --allow-empty -m 'Telok Blangah' 32 | git commit --allow-empty -m 'Labrador Park' 33 | git commit --allow-empty -m 'Pasir Panjang' 34 | git commit --allow-empty -m 'Haw Par Villa' 35 | git commit --allow-empty -m 'Kent Ridge' 36 | git commit --allow-empty -m 'one-north' 37 | git merge EW-line -m 'Buona Vista' # Create Buona Vista Interchange 38 | git checkout EW-line 39 | git merge CC-line # Fastforward CC-line to Buona Vista 40 | 41 | git commit --allow-empty -m 'Commonwealth' 42 | git commit --allow-empty -m 'Queenstown' 43 | git commit --allow-empty -m 'Redhill' 44 | git commit --allow-empty -m 'Tiong Bahru' 45 | 46 | git checkout CC-line 47 | git commit --allow-empty -m 'Holland Village' 48 | git commit --allow-empty -m 'Farrer Road' 49 | git commit --allow-empty -m 'Botanic Gardens' 50 | git commit --allow-empty -m 'Caldecott' 51 | git commit --allow-empty -m 'Marymount' 52 | 53 | git checkout NE-line # Start on NE-line from (6) 54 | git merge --no-ff EW-line -m 'Outram Park' # Create Outram Park Interchange 55 | git checkout EW-line 56 | git merge NE-line # Fastforward EW-line to Outram Park 57 | 58 | git checkout NE-line 59 | git commit --allow-empty -m 'Chinatown' 60 | git branch DT-line 61 | git commit --allow-empty -m 'Clarke Quay' 62 | 63 | git checkout EW-line 64 | git commit --allow-empty -m 'Tanjong Pagar' 65 | 66 | git checkout --orphan marina-bay 67 | git commit --allow-empty -m 'Marina Bay' 68 | git branch NS-line-ns27 69 | git branch CC-line-ce2 70 | git checkout NS-line-ns27 # Start on NS-line from (5) 71 | git merge EW-line -m 'Raffles Place' # Create Raffles Place Interchange 72 | git checkout EW-line 73 | git merge NS-line-ns27 # Fastforward EW-line to Raffles Place 74 | 75 | git commit --allow-empty -m 'City Hall' 76 | git branch city-hall 77 | 78 | git checkout NS-line # Start on NS Line from (4) 79 | git commit --allow-empty -m 'Bukit Batok' 80 | git commit --allow-empty -m 'Bukit Gombak' 81 | git commit --allow-empty -m 'Choa Chu Kang' 82 | git commit --allow-empty -m 'Yew Tee' 83 | git commit --allow-empty -m 'Kranji' 84 | git commit --allow-empty -m 'Marsiling' 85 | git commit --allow-empty -m 'Woodlands' 86 | git commit --allow-empty -m 'Admiralty' 87 | git commit --allow-empty -m 'Sembawang' 88 | git commit --allow-empty -m 'Yishun' 89 | git commit --allow-empty -m 'Khatib' 90 | git commit --allow-empty -m 'Yio Chu Kang' 91 | git commit --allow-empty -m 'Ang Mo Kio' 92 | 93 | git merge CC-line -m 'Bishan' # Merge Circle Line into NS Line 94 | git checkout CC-line 95 | git merge NS-line # Fastforward CC-line to Bishan 96 | git commit --allow-empty -m 'Lorong Chuan' 97 | 98 | git checkout NS-line # At Bishan Interchange 99 | git commit --allow-empty -m 'Braddell' 100 | git commit --allow-empty -m 'Toa Payoh' 101 | git commit --allow-empty -m 'Novena' 102 | git commit --allow-empty -m 'NEW-lineton' 103 | git commit --allow-empty -m 'Orchard' 104 | git commit --allow-empty -m 'Somerset' 105 | 106 | git merge city-hall NE-line -m 'Dhoby Ghaut' # Octopus merge of Somerset, Clarke Quay and City Hall 107 | git branch CC-line-cc1 108 | git checkout NE-line 109 | 110 | # NS-line complete 111 | 112 | git commit --allow-empty -m 'Little India' 113 | git commit --allow-empty -m 'Farrer Park' 114 | git commit --allow-empty -m 'Boon Keng' 115 | git commit --allow-empty -m 'Potong Pasir' 116 | git commit --allow-empty -m 'Woodleigh' 117 | git merge CC-line -m 'Serangoon' 118 | git checkout CC-line 119 | git merge NE-line # Fastforward CC-line to Serangoon 120 | 121 | git checkout NE-line # At Serangoon Interchange 122 | git commit --allow-empty -m 'Kovan' 123 | git commit --allow-empty -m 'Hougang' 124 | git commit --allow-empty -m 'Buangkok' 125 | git commit --allow-empty -m 'Sengkang' 126 | git commit --allow-empty -m 'Punggol' # End of NE-line (7) 127 | 128 | git checkout CC-line 129 | git commit --allow-empty -m 'Bartley' 130 | git commit --allow-empty -m 'Tai Seng' 131 | git commit --allow-empty -m 'MacPherson' 132 | 133 | git checkout CC-line-cc1 134 | 135 | git commit --allow-empty -m 'Bras Basah' 136 | git commit --allow-empty -m 'Esplanade' 137 | 138 | git checkout DT-line # At Chinatown Interchange 139 | git commit --allow-empty -m 'Telok Ayer' 140 | git commit --allow-empty -m 'Downtown' 141 | git merge CC-line-ce2 -m 'Bayfront' 142 | 143 | git merge CC-line-cc1 -m 'Promenade' 144 | git branch CC-line-cc4 145 | git checkout CC-line-cc4 # At Promenade Interchange 146 | git commit --allow-empty -m 'Nicoll Highway' 147 | git commit --allow-empty -m 'Stadium' 148 | git commit --allow-empty -m 'Mountbatten' 149 | git commit --allow-empty -m 'Dakota' 150 | 151 | git checkout EW-line 152 | git merge --no-ff DT-line -m 'Bugis' 153 | 154 | git commit --allow-empty -m 'Lavender' 155 | git commit --allow-empty -m 'Kallang' 156 | git commit --allow-empty -m 'Aljunied' 157 | 158 | git merge CC-line CC-line-cc4 -m 'Paya Lebar' 159 | 160 | # CC-line complete 161 | 162 | git commit --allow-empty -m 'Eunos' 163 | git commit --allow-empty -m 'Kembangan' 164 | git commit --allow-empty -m 'Bedok' 165 | git commit --allow-empty -m 'Tanah Merah' 166 | git branch changi-extension 167 | git commit --allow-empty -m 'Simei' 168 | git commit --allow-empty -m 'Tampines' 169 | git commit --allow-empty -m 'Pasir Ris' # End of EW-line (1) 170 | 171 | git checkout changi-extension # At Tanah Merah Interchange 172 | git commit --allow-empty -m 'Expo' 173 | git commit --allow-empty -m 'Changi Airport' # End of Changi extension (3) 174 | 175 | if [ ! -z "$1" ] && [ "$1" = "push" ]; then 176 | git remote add origin git@github.com:yangshun/smrt-git.git 177 | git push --all --force 178 | fi 179 | --------------------------------------------------------------------------------