2 posts about #git

How to add an image to a gist

1.- Create a gist

2.- Clone your gist:

# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https
git clone git@gist.github.com:<hash>.git     # or with ssh

3.- Open it & move your image

cd <hash>
mv ~/Desktop/image.jpg ~/Projects/gist/image.jpg

4.- Add your image to your gist's repository:

git add image.jpg

5.- Commit the image:

git commit -m "Add image"

6.- Update gist:

git push origin master


Learned by Victor Velazquez on Apr 22, 2021

973983 adforcodereview v3 0211021 c02 021121

Create a Pull Request from the CLI

In 2020 GitHub launched its CLI.
Among many other wonders, it allows you to create a PR from the command line.
Using it is exceedingly easy!

First, install it
$ brew install gh
Then, authenticate
$ gh auth login
Finally, create a PR with
$ gh pr create
If your repo has a PR template, it will make use of it.

Learned by Eduardo GutiƩrrez on Feb 23, 2021

973983 adforcodereview v3 0211021 c02 021121