离线使用Git [英] Offline use of Git

查看:125
本文介绍了离线使用Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们有很多文件并且没有Internet连接,我们如何离线使用git?还是我们可以仅以提交状态存储文件?git是否有存储文件的能力?如果是,那要多少钱?

How can we use git offline if we have many files and do not have an internet connection? Or can we store our files in just a committed state? And does git have capacity to store files? If yes, then how much?

推荐答案

如果要脱机使用git,只需安装git,请转到文件的根目录,然后运行 git init 初始化资料库.然后,您可以运行 git add file_path git commit -m首次提交" 等.

If you want to use git offline just install git, go to the root directory for your files and run git init to initialize the repository. You can then run git add file_path, git commit -m "First commit" etc.

存储库存储在 .git 目录下,该目录在运行 git init 的目录下创建.

The repository is stored under the .git directory that is created under the directory in which you run git init.

这篇关于离线使用Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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