I'm teaching myself Github and have trouble understanding the overall way it is to be used. I'm not sure if my work flow is correct. My understanding a project corresponds to a repo, so I have one for sorting algorithms. I had implemented a quicksort algorithm. Yesterday I began implementing an introsort, but I made a minnor change to a comment in the quicksort.
I then did the following
- git add .
- git commit -m "Began creating introsort implementation"
- git push origin master
However, since a minor chagne was made to the quicksort source, now in Github quicksort has the message "Began creating introsort implementation" which kind of isn't the right place for it.
Is this a problem? What did I do wrong? I guess I shouldn't have used git add .
and instead did the introsort
source by itself. Someone was telling me that a new branch should be made while working on different parts of the same project. Is this right e.g. a new branch for each module? And then they can be merged together when they're working? So using Git branches out at first and then unbranches?