简体   繁体   中英

Push changes from non-git directory to a non-empty git repository

I downloaded an existing Git Project (instead of cloning it). I have made some changes to the code. Now I want to push the changes to the existing repository.

I saw some examples ( Github guide , Stack overflow ) but they all assume that remote repository is empty.

In my case, the remote repository is not empty. I want to push just the additional code (diff) on top of a certain branch. Any ideas?

我认为最简单的方法是克隆现有存储库,然后检出同一分支,然后将非git目录中更改的文件复制到git项目目录中,然后提交它们。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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