2014-02-12 18 views
0

我在我的目录下面的文件和符号链接添加新文件和符号链接。我的问题是如何添加符号链接 。应该我做following.All文件和符号链接是新的文件,这是尚未被提交首次在github上

git add s1 s2 readme.txt 

然后做

git commit -m "" 
git push origin master  

继是我的文件

s1 -> readme.txt 
s2 -> readme.txt 
+1

是的,你所提到的措施会奏效。请注意,如果您稍后将repo分叉到Windows,则符号链接将无法在此处工作。 –

+0

结帐[此](http://stackoverflow.com/questions/954560/what-does-git-do-to-files-that-are-a-symbolic-link)交 –

回答

1

是的,您提到的步骤将工作。 (git add s1 s2 readme.txt && git commit -m "commit message" && git push origin master

请注意,如果你以后分叉回购到Windows,符号链接不会在那里工作。

PS:你将不得不放弃一些提交信息,否则您当前的空字符串提交信息会收到以下错误

Aborting commit due to empty commit message.