Nereus2
Nereus2

Reputation: 27

What is the difference between uploading and cloning?

I am new to Github and I do not understand what is the difference between uploading directly a file from your computer by dragging it (Upload files option) and uploading through clone with SSH.

Is the first option just regular file uploader and the second an option that connects your repository with your local environment?

The reason for asking this is that I am trying to upload a .ipynb file but I do not want changes done in my local computer to affect the file I have uploaded. Is that possible?

Thank you in advance.

Upvotes: 1

Views: 138

Answers (1)

MC Emperor
MC Emperor

Reputation: 22977

The drag 'n' drop option on the GitHub website it just a 'shortcut' for committing a newly added file in your (local) repository and then pushing it. After you released your left mouse button and the file is uploaded, the web interface even asks you to enter your commit message and the branch you want to push to.

Once you've uploaded the file via the website, the file on your computer has no relation to the file within GitHub, so changes are not reflected.

But even if you clone, local changes and even commits won't be reflected on GitHub, until you do git push.

Upvotes: 1

Related Questions