English 中文(简体)
D. 任务和艰苦联系
原标题:Git and hard links

认为Gite不承认该存放处外点的象征联系,是否存在使用硬链接的问题?

Could Git break them? Can you please point me to detailed information?

最佳回答
问题回答

我发现,你可以使用hoo子,抓住<条码>git 拉活动(如果有东西可以拉动......)把文字活动手写到<条码>。

首先,必须<代码>chmod +x。

然后,将<代码>ln的指令放在该校内,以便在每一起拉动中重新建立硬链接。 Neat huh!

它运作,我刚刚需要我的项目和<代码>ls -i。 显示文档在<代码>pull后自动链接。


我的<代码>.git/hooks/post-joint:

#!/bin/sh
ln -f $GIT_DIR/../apresentacao/apresentacao.pdf $GIT_DIR/../capa/apresentacao.pdf
ln -f $GIT_DIR/../avaliacoesMono/avaliacao_monografias_2011_Nilo.pdf $GIT_DIR/../capa/avaliacoes.pdf
ln -f $GIT_DIR/../posters/poster_Nilo_sci.pdf $GIT_DIR/../capa/poster.pdf
ln -f $GIT_DIR/../monografia/monografia_Nilo.pdf $GIT_DIR/../capa/monografia_Nilo.pdf

IMPORTANT:正如你可以看到的那样,从开始,进入贵存放处的任何档案,然后在档案中增加部分相对途径。

同样重要的是,<代码>-f是必要的,因为你正在重新查找目的地档案。

EDIT

现代盖特客户似乎自然地支持存放处内部的link关和硬通关,即便是在向遥远地点移动,然后从那里进行克隆。 我从来就没有必要再把po湖外连接起来......

$ mkdir tmp
$ cd tmp
$ git --version
git version 2.24.3 (Apple Git-128)
$ git init .
Initialized empty Git repository in /Users/teixeira/tmp/.git/
$ mkdir x
$ cd x
$ echo 123 > original
$ cat original
123
$ cd ..
$ ln -s x/original symlink
$ cat symlink
123
$ ln x/original hardlink
$ cat hardlink
123
$ git add .
$ git commit -m  Symlink and hardlink commit 
[master (root-commit) 8df3134] Symlink and hardlink commit
 3 files changed, 3 insertions(+)
 create mode 100644 hardlink
 create mode 120000 symlink
 create mode 100644 x/original

Cloning from local git repository

$ cd
$ git clone tmp/ teste_tmp
Cloning into  teste_tmp ...
done.
$ cd teste_tmp/
$ ls
hardlink  symlink  x
$ cat symlink
123
$ cat hardlink
123

Cloning from remote repository

$ cd ~/tmp
$ git remote add origin https://github.com/myUser/myRepo.git
$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 361 bytes | 361.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To https://github.com/myUser/myRepo.git
 + 964dfce...8df3134 master -> master
$ cd ../
$ git clone https://github.com/myUser/myRepo.git
Cloning into  myRepo ...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
$ cd myRepo/
$ cat symlink
123
$ cat hardlink
123

https://github.com/mokacoding/symlinks”rel=“nofollow noreferer”>https://github.com/mokacoding/symlinks 还有一点很重要:必须相对地界定连接点。

http://web.archive.org/web/20130804235720/http://code.google.com/p/msysgit/issues/detail?id=224“rel=“nofollow noreferer”>msgit

混淆点不是象征联系;因此,象征联系根本得不到信封。

此外,Gite/strong从没有跟踪<>硬链接。

关于Gite总体的硬性联系的意见。 具体问题是微软Windows-定向(因为它涉及msysgit),讨论讨论了象征联系的潜在支持。

谷歌集团保留了硬联系,它表明,光顾如何保护AFAIK的硬联系结构,或许是设计的。

网页项目:

www/products/index.php
www/products/dell_latitude_id577/index.php #(hard linked to above)
www/products/dell_inspiron_id323/index.php #(hard linked again to above)

me@server:www/products$ ls -l index.php
-rwxr-xr-x 3 me me 1958 Aug 22 22:10 index.php*

如果我想改动索引.php,我改用一个地方,而硬性链接(产品详细页)则指变化——但盖特在克隆和用其他电脑拉动时并不保持这种关系。

me@server:www$ git pull

在另一台机器上安装新的指数。 每一条硬性连接点都存在。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...