I want to make sure I’m using GitHub properly so let me describe my current process. When I start a new project, I create a repository on the GitHub website first. Then I clone it to my local machine using VS Code and start coding. After I finish working, I run these commands:
git add .
git commit
git push
Here’s my question - every time I want to work on the same project again, I clone the repository again from GitHub. Is this the correct approach? I’m worried this might be using up extra storage space on my computer without me realizing it.
Should I be doing something different? If there’s a better and more efficient workflow, I’d really appreciate if someone could explain it to me.
It’s great that you’re thinking about efficient use of storage. You don’t need to clone the same repository multiple times. Instead, just access the existing folder on your local machine for that project. Whenever you’re ready to work again, make sure to run git pull first to sync any changes made to the remote repository. Your current commands for adding, committing, and pushing are correct. Treat your local repository like any other project folder that you return to, and you’ll save space while managing your code effectively.
You’re wasting disk space by cloning the same repo over and over. Once you clone it, that folder is your workspace, so just keep using it. Navigate back to that same folder every time you want to work. Run git pull first to grab any new changes, then do your normal add/commit/push routine. Don’t think of it as downloading files each time; it’s your permanent workspace for that project.
jessica, you’re overcomplicating things! just clone it once and use that same folder. bookmark it or something. no need to keep cloning; it’s eating up storage with all those duplicates!
yo jessica! you def don’t need to clone again, just open that same folder. use git pull to get any updates from the repo. cloning again just eats up space, so stick with the one you got!