Happy Coding

Reduce the size for Git Clone

I am cloning the repo but it is taking a longer time as it also clones the entire commit history.

Is is ok to use git clone --depth 10 https://github.com/KevinWorkman/HappyCoding.git to reduce the dl size?

As long as you get all of the files, I don’t think you really need the history.

But for what it’s worth, the whole site should only be about 250 MB. If it’s taking a long time to download, I’d wonder if something is broken or reconfigured.

actually I am getting confused all the time over this. Since I forked the repo, and after that the original repo keeps on moving ahead (* commits ahead). How can I keep my local repo on PC to be always updated to the original one? Will doing this work (https://webkul.com/blog/syncing-local-repository-with-remote-repository-on-github/)

I’m not really a git expert, but I think generally you need to pull whenever you want to get new changes. When I’ve used git before, I’ve started most of my coding sessions with a pull.

But also, it’s not the end of the world to be a few commits behind, especially if you’re not planning on touching the same files as I am.

Out of curiosity, what are you planning on doing with a local copy of the repo?

to contribute some stuff, and then create pull request ! :stuck_out_tongue:

Haha sounds good.

If you’re on Windows, I’ve found that the GitHub desktop client works pretty well:

On the other hand it tends to hide what’s going on behind the UI, so if your goal is to learn more about git, then you might be better off using the command line.

i am a senior student. I will be not doing justice to myself. I will solve this issue. Have a good night!

1 Like

You too! Let me know if you get stuck with any other git issues, I know it can be super confusing!