如何将文件夹提交到 gitHub
我是 GitHub 的新手,能够创建一个 README 文本文件并将其提交(从我的本地计算机到 github 站点),但现在我的问题是,我有一个文件夹,我需要将该文件夹提交到 git hub,你们中的任何一个人都可以吗?帮我解决这个问题。
I am new to GitHub, able to create a README textfile and commit that (from my local machine to github site) but now my problem is, i have one folder and i need to commit that folder to git hub, can any one of you help m e on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
试试这个:
Try this :
非常简单。按照一些步骤操作 -
Its very simple. Follow some steps-
git add FOLDERNAME
之后,您可以像处理 README 文件一样进行正常的提交+推送。
git add FOLDERNAME
After that, you can do a normal commit + push as you did it with the README file.
试试这个:
folder_path应该是完整路径,类似于
../../../folder_path
Try this :
folder_path should full path, something like this
../../../folder_path
按照以下步骤将您的文件夹更新到 GitHub:
步骤 1:导航到包含代码的本地存储库(文件夹)并对其进行初始化
步骤 2:将文件夹添加到 GitRepository 中的可跟踪文件/文件夹列表中
步骤 3:提交将文件夹(保存所做的更改)添加到 GitRepository
第 4 步:将 GitHub 连接到本地计算机,在这里将远程名称 origin 添加到 GitHub 存储库。您可以从 GitHub 的“克隆或下载”链接获取此 URL
步骤 5:将提交的文件/文件夹推送到 HitHub 存储库
刷新 GitHub 存储库,您可以保存提交到存储库的文件夹。
我希望这会有所帮助!
Follow this steps to update your folder to GitHub:
Step 1: Navigate to your local repository(folder) that contains your code and initialize it
Step 2: Add the folder to be a part of trackable files/folders list in GitRepository
step 3: Commit the folder(save your changes made) to GitRepository
step 4 : connect GitHub to your local machine, Here you add a remote name origin to GitHub Repository. You can get this URL from "Clone or Download" link from your GitHub
Step 5: Push the committed files/folders to HitHub repository
Refresh the GitHub repository and you could save the folder committed to respository.
I hope this would be helpful!!