虚心请教一个git的问题
Tofloor
poster avatar
Ethan
deepin
2017-05-31 23:29
Author
假设我有两个目录的文件需要git跟踪,A目录为活跃目录,B目录为沉寂目录。现在希望git status,git diff,git push和git pull这个命令只考虑A目录,不考虑B目录。但是git clone仍然需要考虑B目录。git该如何配置,如何使用?

初衷:B目录文件千千,大小万万,git执行起来非常慢。B目录的东西还是希望放到git 跟踪可以方便获取。

Reply Favorite View the author
All Replies
avatar
159******54
deepin
2017-06-01 01:46
#1
不知道 .gitignore 符不符合你的要求
Reply View the author
avatar
DebuggerX
deepin
2017-06-01 04:31
#2
没看懂……
为什么不直接分别给A和B建立两个git库。。。
Reply View the author
avatar
Ethan
deepin
2017-06-01 16:52
#3
https://bbs.deepin.org/post/140336
不知道 .gitignore 符不符合你的要求

不符合。.gitignore只考虑文件跟不跟踪。
Reply View the author
avatar
Ethan
deepin
2017-06-01 16:52
#4
https://bbs.deepin.org/post/140336
没看懂……
为什么不直接分别给A和B建立两个git库。。。

我现在就是这个搞的。建成两个仓库,不好维护啊。
Reply View the author
avatar
159******54
deepin
2017-06-01 17:06
#5
貌似svn可以更新某个目录操作
Reply View the author
avatar
134******40
deepin
2017-06-01 17:19
#6
这个估计SVN倒是可以
Reply View the author
avatar
DebuggerX
deepin
2017-06-01 18:17
#7
https://bbs.deepin.org/post/140336
我现在就是这个搞的。建成两个仓库,不好维护啊。

要不你看看Submodule是不是能满足你?
  1. http://www.jianshu.com/p/b49741cb1347
Copy the Code
Reply View the author