Git:从本地回购推送的文件没有显示在远程git回购中 [英] Git: Files pushed from local repo not showing up in remote git repo

查看:139
本文介绍了Git:从本地回购推送的文件没有显示在远程git回购中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是全新的 git,我刚开始弄清楚。我一直在试图找出我的远程开发服务器以及我的本地机器上的混帐。我已经在远程服务器和本地计算机(OSX)上成功安装了git。我使用的是一个名为Tower的mac git客户端,这里是我的两难选择......

我可以在远程服务器上成功创建一个裸存储库,这里没有问题。然后我打开Tower并尝试将我的远程存储库克隆到本地机器。我也能够做到这一点,我可以成功地将远程仓库克隆到我的本地机器。但是,无论何时我向本地分支添加一个新文件,然后提交该更改并推送到远程仓库,它都表示它成功完成,但是当我检查远程仓库位置时,那里没有新文件?



塔说,该文件存在于远程repo中,我可以检出该repo到一个新的本地分支,并且它会像以前一样提取以前的提交历史记录和文件,但是我可以' t找到文件存储在远程仓库中的位置。



我在这里丢失了什么?任何建议将不胜感激,谢谢!

解决方案

它们被存储为Git对象。裸存储库没有工作目录,所以在服务器上永远不会有任何文件被检出。数据存储在Git自己的内容可寻址文件系统下的 objects 目录下,由目标内容的SHA1哈希键控。对象包括blob(文件数据),树(文件和树的列表)和提交(元数据,如作者姓名,时间戳,提交消息,父提交对象ID以及与提交对应的树对象ID)。 p>

(这些对象也可以合并到包中,它们将位于 objects / pack 目录下。)


I'm brand new to git and am just starting to figure things out. I have been trying to figure out git on my remote dev server as well as my local machine. I have installed git successfully on both my remote server and my local machine (OSX). I am using a mac git client called Tower, here is my dilemma...

I can successfully create a bare repository on my remote server, no problems there. I then open up Tower and attempt to clone my remote repository to my local machine. I've been able to do that as well, I can successfully clone the remote repo to my local machine. However, whenever I add a new file to my local branch and then commit that change and push to the remote repo, it says it goes through successfully, but when I check my remote repo location, there are no new files there?

Tower says that the file exists in the remote repo, I can checkout that repo to a new local branch and it pulls the previous commit history and files like it should, but I can't find where the files are being stored on my remote repo.

What am I missing here? Any advice will be greatly appreciated, thanks!

解决方案

They are being stored as Git objects. Bare repositories do not have a working directory, so there will never be any files checked out on the server. The data is stored in Git's own content-addressable filesystem under the objects directory, keyed by the SHA1 hash of the objects' contents. Objects include blobs (file data), trees (lists of files and trees), and commits (metadata such as author name, timestamp, commit message, parent commit object IDs, and the tree object ID that corresponds to the commit).

(The objects may also be combined into packs, which will live under the objects/pack directory.)

这篇关于Git:从本地回购推送的文件没有显示在远程git回购中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆