Welcome to the InfoLab! Please follow these instructions to get familiar with our lab's Github workflow.
- Clone this repository,
git clone [email protected]:infolab-csail/welcome-demo.git
. - The previous step will have cloned the repo into a new subdirectory
named
welcome-demo
.cd
to it. - Create a branch named after yourself,
git checkout -b add-<yourname>-fav-num
. - Add your name and favorite number to
numbers.csv
.
- Your name must start with a capital letter
- Your favorite number must be a valid int
-
Stage and commit your changes.
git add numbers.csv git commit -m "Add <your name>'s favorite number" git push origin add-<yourname>-fav-num
(Hint: For a one-line log message like in this Welcome Demo,
git commit -m
is convenient. However, you should often write longer log messages, with an initial subject line and a descriptive body. In that case, omit the-m
option. Git will open up a text editor for you to enter your log message, so that you can edit multi-line messages with access to convenient editing commands like filling paragraphs. (You can configure your account to use a different editor if you don't like the default editor.) To submit the log message, save the editor buffer and exit in the standard way for that editor.) -
Create a pull request (PR) with your changes.
-
Wait for Github Actions checks to pass. If checks fail, your change probably broke the format of the
numbers.csv
file. Make modifications by pushing more changes to theadd-<yourname>-fav-num
branch. -
Request a review from Sue by adding her as a reviewer and an assignee for the PR. If you followed these steps correctly, Sue will say your PR looks good and will assign it back to you. Then, merge it by clicking "Merge pull request". Since you will not be using this branch for any future commits, delete it by clicking "Delete branch" in the closed PR.
Now that you are familiar with the basics, see Infolab Github Workflow for some more details about using Git and GitHub well.