本地机器中的git存储库可以从笔记本电脑访问(git repository in local machine to access from laptop)
我想使用以下设置来使用git:对于给定的项目,我希望将我的“origin”存储库放在我的桌面计算机的工作目录中($ desktop)。 然后我希望能够从家里或其他任何地方($ laptop)访问,拉取和推送此存储库。
对于我在其他问题中看到的内容,该过程通常会涉及在我的桌面上使用创建一个裸git存储库
$desktop > git init -bare
但是我的理解是,这会生成一个没有工作目录的存储库。 我不想要这个。 我希望我的存储库是特定于项目的,位于我的桌面和笔记本电脑的给定目录中,并且只跟踪我保存在给定目录树中的内容。 这显然是git的问题,并且应该“永远”推入正常的存储库。
有没有办法整理出来?
I would like to have the following setup to work with git: for a given project I would like to have my "origin" repository in a directory of my desktop computer at work ($desktop). Then I would like to be able to access, pull and push from this repository from home or anywhere else ($laptop).
For what I have seen in other questions the process would normally involve creating a bare git repository in my desktop using
$desktop > git init -bare
However my understanding is that this would produce a repository without a working directory. I don't want this. I want my repository to be project specific, to be located in a given directory in both my desktop and laptop and to keep track only of stuff that I keep in a given directory tree. This is apparently problematic with git and that one should "never" push into a normal repository.
Is there a way of sorting this out?
原文:https://stackoverflow.com/questions/11325727
最满意答案
试试这个:代码笔的更新版本: http : //codepen.io/anon/pen/GvCif
Try this : an updated version of your code pen: http://codepen.io/anon/pen/GvCif
相关问答
更多-
试试这个:代码笔的更新版本: http : //codepen.io/anon/pen/GvCif Try this : an updated version of your code pen: http://codepen.io/anon/pen/GvCif
-
我做了一个例子,你需要在页面中添加jquery: jQuery(function($) { $('.topDiv').on('scroll', function() { if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) { $('body').addClass("hide"); } else { $('body').rem ...
-
Div高度匹配子div(Div heights matching sub divs)[2021-10-18]
父母(#aboutus-box1)需要另一种风格: overflow: hidden; The parent (#aboutus-box1) needs another style: overflow: hidden; -
这不是很好,加上如果文本改变大小,你将不得不调整你的CSS。 相反,删除填充和边距,给整个.inner一个aqua的背景,但改变#two的背景为白色。 这是我在小提琴中改变的: #two { background-color: #fff; } .inner { background: aqua; overflow: hidden; border-radius: 5px; } 小提琴: http : //jsfiddle.net/QtTeA/1/ That's not gr ...
-
我假设从你的代码中你想要两个盒子(一个和两个)如果它们没有填充空间那么底部对齐? 如果是这样,你应该试试这个: .one { display:inline-block; width: 200px; min-height: 100px; background: yellow; vertical-align: bottom; } .two { display:inline-block; width: 300px; min-height: 300p ...
-
如果将其位置设置为inline ,容器的line-height与其height相同,则可以vertical-align:middle对齐元素,然后将vertical-align:middle应用于容器: 还要注意white-space:nowrap; 这会阻止按钮包装到容器div中的第二行,并且由于我们从按钮的位置移除了block ,您可以通过应用更大的padding-left (将其移除以查看发生的情况)将其拉伸到其大小 .lbl-ctrl-unit { padding-top:2px; ...
-
div有不同的高度(divs have different heights)[2022-05-23]
您需要删除图像的width: 100% ,列的高度相等。 小提琴 。 You need to remove width: 100% for the images and the columns will be equal in height. Fiddle. -
浮动元素会使其脱离正常的元素流,其中一个副作用是它将不再影响其父元素的直线。 清除float的最简单方法是将父级的overflow属性设置为hidden 。 但是,这可能是不合需要的,因为您可能在父级中嵌套了需要溢出它的元素。 在这种情况下,使用:after伪元素清除浮动元素。 .parent:after{ clear:both; content:""; display:block; height:0; } 第三个解决方案是简单地给浮动元素后面的兄弟提供clear属性,但显 ...
-
调整内容的div高度(Adjusting div heights for content)[2021-05-16]
看起来你有一些问题。 在#container上设置高度是个问题,而不清除#content和#rightbar元素的浮动是另一个问题。 我的信念是,修复这两件事会给你带来你期望的结果。 It seems like you have a few issues. Setting a height on #container is a problem, and not clearing your floats of your #content and #rightbar elements is another pr ... -
展开div的高度,使其从初始位置到达容器的底部(Expand height of div to reach bottom of container from it's initial position)[2022-05-11]
正常流量:我认为这就是你的意思。 对不起,我不明白你的问题。 N: 块级元素高度,如果没有设置,设计为适合他的孩子 所以.child高度是100%(他适合它的内容) .parent高度是100%(他适合它的内容),所以没有高度设置为.parent .child将始终触底。 如果.parent高度设置为大于100%(例如5000px),则需要将.child (绝对到底部)和.parent (相对,作为位置祖先)。 div.spaceTruck { outline: 1px solid green; ...