将存储库的所有本地文件推向远程

发布于 2025-01-25 22:42:04 字数 500 浏览 0 评论 0原文

我有本地存储库(用GIT进行管理),其中包含我项目的所有旧版本,现在我想将其上传到Gitlab(GL)和Sourcetree(ST)。我在GL中使用链接创建了我的项目,例如https://gitlab.com/myusername/myproject

我使用ST将所有分支和标签推向原点,即GL Repo https://gitlab.com/myusername/myproject.git

为了验证,我将存储库克隆在演示本地存储库中,并比较了原始Loacal Repo的大小和数量。演示回购,发现两者之间存在巨大差异。

我怀疑仅最新提交或签到分支的文件,并且修订的历史记录上传到GL(而不是与旧的修订/提交相关的本地文件,这些文件与本地回购中的隐藏文件夹中存在,因为我看不到它们我的远程存储库中的服务器)。

如何同步/上传所有提交的所有文件到遥控器的所有文件,以便我可以备份我的存储库,以防我本地存储库发生任何事情。

提前致谢。

此致

I have local repository (managed with Git) which contains all the older versions of my project and now I want to upload it to GitLab (GL) and SourceTree (ST). I created my project in the GL with link like https://gitlab.com/myusername/myproject.

I used ST to push all my branches and tags to the origin i.e. GL repo https://gitlab.com/myusername/myproject.git.

To verify, I cloned the repo in a demo local repo and compared the sizes and number of files of original loacal repo & demo repo and found out that there is huge difference between the two.

I doubt that files of only latest commit or checked out branch and history of revisions are uploaded to GL (and not local files related to older revisions/commits which are present in hidden folder in the local repo because I can't see them on the server in my remote repo).

How can I sync/upload all files of all commits to the remote so that I can backup of my repo in case anything happens to my local repo.

Thanks in advance.

Best Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文