你確定你不應該創建一個全新的存儲庫,並開始複製這兩個文件嗎?
$ mkdir my_repo
$ cd my_repo/
$ git init
Initialized empty Git repository in /Users/annelicuss/my_repo/.git/
$ wget https://raw.github.com/visionmedia/express/master/lib/request.js
--2012-05-13 20:38:08-- https://raw.github.com/visionmedia/express/master/lib/request.js
Resolving raw.github.com... 207.97.227.243
Connecting to raw.github.com|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8878 (8.7K) [text/plain]
Saving to: `request.js'
100%[======================================>] 8,878 --.-K/s in 0s
2012-05-13 20:38:10 (242 MB/s) - `request.js' saved [8878/8878]
$ wget https://raw.github.com/visionmedia/express/master/lib/response.js
--2012-05-13 20:38:16-- https://raw.github.com/visionmedia/express/master/lib/response.js
Resolving raw.github.com... 207.97.227.243
Connecting to raw.github.com|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15276 (15K) [text/plain]
Saving to: `response.js'
100%[=======================================================================================================>] 15,276 --.-K/s in 0s
2012-05-13 20:38:17 (280 MB/s) - `response.js' saved [15276/15276]
$ ls
request.js response.js
$ git add *
$ git commit -m 'Add request, response from Express.'
[master (root-commit) be4a6d9] Add request, response from Express.
2 files changed, 1059 insertions(+), 0 deletions(-)
create mode 100644 request.js
create mode 100644 response.js
$ git log
commit be4a6d9c82cb48b61f662e1e83a9f696a6685883
Author: Arlen Cuss <[email protected]>
Date: Sun May 13 20:38:37 2012 +1000
Add request, response from Express.
$
請注意,即使這可能不會做你想要的; request.js
和response.js
都取決於,例如, util.js
在同一目錄中找到。您可能需要將Express作爲項目的依賴項添加。
https://github.com/kissjs/kick.js/blob/master/lib/request.js我需要導入這個文件作爲我的框架的一部分,但我想保持尊重這些貢獻者的歷史,什麼我做的很愚蠢。 –
@桂林桂林:我不認爲試圖保留改變歷史將會真的做任何事情來表現尊重,它會讓你的工作變得更加困難! – Ashe