How to push/commit when you have downloaded the master? #21816
-
So I’m pretty new. I have some group work on github. I was invited to the repository. I clicked to download the zip of the repository. I then did some of the code. Saved the file to my computer. And now I need to push/commit that back to the master? How do I do that? I downloaded git desktop but it looks like I messed up becasue that tells me to clone, do I need to redo my work? I’m just confused. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @rosie000, usually when you download as a zip, it’s just a full copy of the code but it’s not connected to the main repo itself. The proper way to collaborate is to git clone the repo and then make your changes to it. With that said, a potential workaround that I have had to use myself a few time is as follows:
Let me know if you have any additional questions! |
Beta Was this translation helpful? Give feedback.
-
how to push the code another git |
Beta Was this translation helpful? Give feedback.
Hey @rosie000, usually when you download as a zip, it’s just a full copy of the code but it’s not connected to the main repo itself. The proper way to collaborate is to git clone the repo and then make your changes to it. With that said, a potential workaround that I have had to use myself a few time is as follows:
Git Clone the repo’s master branch to a known location on your computer (like the Desktop).
Open up file explorer or finder and then move the “.git” folder from your cloned version into the top level of the version you downloaded via zip. This should then automatically make git see the changes.
From there, you can use the command line (by navigating into that folder) or…