简体   繁体   English

将整个文件夹推送到本地Git存储库

[英]Pushing an entire folder to local Git repository

I have this local directory /Users/OSX/Documents/Git/ where I initialized as my git by git init . 我有这个本地目录/Users/OSX/Documents/Git/我通过git init初始化为我的git init

How can I push an entire library eg /Users/OSX/Documents/Project/Test to my git repository? 如何将整个库(例如/Users/OSX/Documents/Project/Test推送到我的git存储库?

  1. Copy /Users/OSX/Documents/Project/Test into your actual git repo so it can be tracked /Users/OSX/Documents/Project/Test复制到您的实际git仓库中,以便跟踪它
  2. change directory into /Users/OSX/Documents/Git 将目录更改为/Users/OSX/Documents/Git
  3. git add Test to add the Test directory to be tracked by git git add Test添加要由git跟踪的Test目录
  4. git commit -m "Added Test to repo" to commit it to the repo git commit -m "Added Test to repo"以将其提交给repo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM