Git Question

Soldato
Joined
10 Feb 2008
Posts
3,846
Hi All

I recently cloned a repository to my PC. I understand the idea of add, commit, push etc, but I am slightly confused at the idea of a "working directory" and what is actually happening in detailed terms when a commit is made.

Is a "commit" actually updating a file which lists an index of other files and "time stamps"? and In turn that file is used by the remote repo to decide what to upload upon the next push? Or is a commit simply copying files from one directory on the PC, to the other one (that in turn is configured to push to remote) ?

Am I doing something wrong if I simply clone a repo, open files directly from the local repo, edit and save them (with a commit in due course...)? What's the standard working practise?


Thanks,
 
Thanks all. I understand forking, branch etc. It was just whether i was doing something wrong in opening files in the local repo on my PC, (rather than some other workspace folder elsewhere on my PC) but it doesn't sound like i've done anything wrong. I understand that the .git folder contains the clever stuff and ultimately git is logging changes, and is never actually uploading / downloading files on each change so that makes a bit more sense to me for the need for a "commit" rather than just a normal "save" before a push.
 
Back
Top Bottom