---
tags: Random
title: Github CLI notes
---
# Github CLI notes
> Quick example of how to send changes perfomed on our local computer to github. This needs to be in the github repository on our local computer (so after, e.g., doing `git clone` to get it on our computer). My short notes on setting up github access can be found [here](https://hackmd.io/@astrobiomike/setting-up-github-access).
[toc]
## tl;dr
```bash
git status
git add *
git commit -m "message about what we changed/added goes here"
git push
```
This example is with my happy belly github.
## Checking status
`git status` checks if there have been any changes from how it was pulled from github. This is before I made any changes:
```bash
git status
```

After making a change:

## Adding changes to be committed
Things can be added as individual files if wanted, or all changes can be added like so:
```bash
git add *
```
```bash
git status
```

## Committing changes
The `commit` needs to have a message attached to it, useful to describe what we're changing or adding. That an be provided with the `-m` flag as shown here:
```bash
git commit -m "small change for git CLI example"
```

```bash
git status
```

Now the status says we are ahead of "origin/master" (the GitHub repository) by 1 commit.
## Pushing changes to GitHub
```bash
git push
```

And now the changes are updated in GitHub, and anyone can access the latest, e.g:
