0

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?

2
  • Do you have a .git folder?
    – Tim
    Commented Oct 30, 2015 at 8:48
  • Nope. I downloaded a particular branch of the project. The .git directory is not present in the download.
    – aadarshsg
    Commented Oct 30, 2015 at 8:50

1 Answer 1

1

I think that easiest way to do it would be cloning existing repository,then checking out the same branch, and then copying files changed in non-git directory to your git project directory, and then commit them.

1
  • I.e. why would you use a fork to eat a soop. Good answer
    – Ivan
    Commented Oct 30, 2015 at 10:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.