Command | Usage |
---|---|
git clone <repositorylink> |
Get the code from Github to your personal computer. Run once per lab. |
git add <filename> |
Indicate that you have modified filename and are ready to update it on Github. |
git commit -m "message goes here" |
Commit the new changes to Github, with a message that tells yourself and others what you changed. |
git push |
Push the code to Github---this is the final step to putting your changes on Github. |
git status |
Checks the current status---will show you if you have any changed files that are not recorded on Github, or any commits that have not been followed by a push. |
git clone <link>
git clone git@github.com:ucsb-cs16-1-u22/exampleRepo.git
ls
, you'll find that there is a new folder with the name of the repository (in this case, exampleRepo). You can use the cd
command with the name of that folder to move into the folder and check that all of the files are there.
git status
to check which files you've changed. Here is an example output from git status
, after I made a small change to the main.cpp file and also created a new file in this directory called extra.cpp:git add main.cpp
git add extra.cpp
git status
again, we can see that both of these files are listed in green:git commit -m "informative message here"
git status
here will show us a message like this:git push