Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. Initializing a new git repo with Github's hub CLI #1

Closed
prophen opened this issue Feb 16, 2020 · 1 comment
Closed

1. Initializing a new git repo with Github's hub CLI #1

prophen opened this issue Feb 16, 2020 · 1 comment

Comments

@prophen
Copy link
Owner

@prophen prophen commented Feb 16, 2020

Notes on Initializing a new git repo with Github's hub CLI

Install hub

https://hub.github.com/
image

Hub is new to me. I installed it using Homebrew. I recommend that you install it and create your project folder before you start this collection.

brew install hub

hub version
git version 2.25.0
hub version 2.14.1 # ← it works!

# indicate that you prefer HTTPS to SSH git clone URLs
git config --global hub.protocol https

Create the local repository

cd into your empty project folder mine is called serverless-todo

The first thing Chris instructs us to do is initialize the git repo.
git init .

This command creates a README.md file for the repo
echo "Serverless TODOs" > README.md

You can preview the contents of the file with cat
cat README.md

Add the README to your local git repo
git add README.md

image
gcmsg 'readme'

Chris uses an alias to commit. I'd never seen these before and I didn't realize that they were already enabled on my zsh. If you use zsh, the git plugin gets you a whole list of useful aliases. I found this article that shows you how to set them up in bash.

https://jonsuh.com/blog/git-command-line-shortcuts/

Using hub to create the repo on GitHub

image

Chris already has hub installed and the alias set up. I had to figure out how to get to this point on my computer.

There's a command you can use to get the instructions.
https://hub.github.com/hub-alias.1.html

hub alias

image

hub create

image
push and follow the link hub created. You will see your README published on GitHub

git push -u origin master
@prophen

This comment has been minimized.

Copy link
Owner Author

@prophen prophen commented Feb 17, 2020

Closing this issue. I'll be adding notes to the repo code.

@prophen prophen closed this Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.