About GIT pushh

When I push my file into GitHub.
After than, Can I delete all file on my computer ???

why would you do that? That means you have to pull the files/clone the repository again before you can start working again.


because My laptop so weak, so I want to delete after I push on GitHub
. Can I do that?
I think the way clone/ pull , it’s not take a lot of my time

can you? Yes. Should you? No. git has always been intended to have one central repository (github) and every developer working on the project have a local copy of this repository.

besides, files on your computer (while not using them) only take up storage. So you have a storage problem?


meh? no. it is distributed. there isn’t a central repository. no action requires a central server. you can use it with multiple users without a central repository. but having an always-online central node is handy.

That’s not related to uploading files. You can delete them either way. Maybe you mean to ask whether copying your data… copies it. It does. Is there data that you would want to keep in your repository… That depends, what do you want to keep? If you don’t want to keep anything other than what’s now also in the other repository then no there’s nothing you’d want to keep. That could be branches that you didn’t push to the other repository, or untracked files, or metadata like where the other repository exists. I’m sure you’ve noticed these are all circular arguments, that’s because nobody can tell you whether you want to delete something. Commit what you want to keep, push the changes to a remote repository, and then sure, since you committed everything you care about, delete your copy. Git repositories are pretty compact though (so long as you’re only keeping text in it) so perhaps it makes more sense to remove everything except the repository (git clean).