Question

Newbie question. Say, I just cloned a repository on GitHub to my PC. What happens if I delete some files and directories from the cloned repo?

  • Will only the existing files in the cloned repo be updated?

  • or will the next update replace the cloned repository with all the files and directories?

The thing is, I am trying to track the changes of a directory inside a repository, and I am using GUI Git client (GitHub for Windows), and have no clue how to do it.

Was it helpful?

Solution

1 As soon as you make changes (including deleting a file), GitHub for Windows will show them inside "uncommited changes".

2 You can make a version of your project with these changes by entering a comment and hitting "commit". The changes are still only on your own machine.

3 When you are ready to send the changes to GitHub, hit the "sync" button. This will send your changes to GitHub. (It will also download changes from GitHub to your machine, if anyone else has made any changes).

Diagram of the above steps

Don't worry too much if you don't understand the answer from Sunil. You don't need to understand the Git command line to use GitHub for Windows. (I would however, recommend that you do learn some basic Git commands, as you'll have a better idea of what GHFW is doing).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top