Collaboration with Github for Class Projects
This is the shortest explanation of how to set up Github for a class project I could come up with.
One time steps:
1) Make an account
2) Make a repository
3) Invite your partners to your repository
4) git clone (the URL) - the URL can be found under the green code button on the code tab. Copy the URL and paste it after "git clone " on the command line.
5) git config --global user.email "Your email address"
6) git config --global user.name "Your name"
7) Go to account - settings - developer settings - personal access tokens, and click generate new token, give yourself all permissions (or if you're more advanced limit yourself to just permissions you need) and then save the P.A.T. generated to a notepad somewhere so that you can use it as your password later when you do a "git push".
You will be doing these steps repeatedly:
0) git pull - download any updates from the repository
1) Edit the code, compile it, test it, etc., until you're happy with it.
2) git add (filename) - stages the changes to be committed, replace filename with main.cc or whatever file it is you edited. Or "git add ." to do all of them.
3) git commit -m "commit message" - Replace commit message with a description of the changes you made
4) git push - uploads the changes to the repository
Your workflow will be repeating steps 1-4 over and over to upload your changes to the repo. You do a git push, your partners do a git pull, and they get all the changes. They upload something with a git push, you do a git pull and download the changes they made.