-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0a6d25
commit 03cafc4
Showing
12 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ Add missing remotes prior to performing git fetch. Allow space separated list of | |
remotes you want to fetch with a flag (--multiple). You can update more than one | ||
remote with a single command. | ||
|
||
```sh | ||
```bash | ||
hub fetch <remote-name> | ||
# equivalent with GitHub | ||
# add the remote-name and fetch the remote-name | ||
|
@@ -45,7 +45,7 @@ hub fetch staging oluwasetemi/feature oluwasetemi/test | |
Initialize a git repository and add a remote pointing to GitHub.By the time you | ||
run the command , it would have run `git init`, `git remote add` | ||
|
||
```sh | ||
```bash | ||
hub init -g | ||
|
||
# git equivalent | ||
|
@@ -65,7 +65,7 @@ text like `Merge pull request #Number from branch ....`. Hub is very beautiful | |
and it simplify the process most especially if you do not want to leave your | ||
command-line interface. | ||
|
||
```sh | ||
```bash | ||
hub merge <pull-request-url> | ||
``` | ||
|
||
|
@@ -82,7 +82,7 @@ status will be turned to merged. | |
Push a git branch to each of the listed remotes.Accept more than one listed | ||
remote. | ||
|
||
```sh | ||
```bash | ||
hub push <remote>, <remote2> | ||
|
||
# git equivalent is running git push <remote> <remote2> | ||
|
@@ -95,7 +95,7 @@ remote is the api i.e you only add the remote name as against the remote url | |
with git. So it means the hub goes to GitHub and find the remote you're | ||
inferring and it is added. | ||
|
||
```sh | ||
```bash | ||
hub remote add <remote-name> | ||
|
||
# git equivalent | ||
|
@@ -109,7 +109,7 @@ Git repositories nested inside a parent Git repository at a specific path in the | |
parent repository's working directory. I am not so familiar with using | ||
`git submodule`. | ||
|
||
```sh | ||
```bash | ||
hub submodule add <submodule-path> | ||
|
||
# also the same as | ||
|
@@ -126,7 +126,7 @@ and it offers GitHub features in commands we can use easily add to our workflow. | |
Show shell instructions for wrapping git. Understanding that hub wrapping `git` | ||
gives us an extended functionality of `git` as it relates to GitHub. | ||
|
||
```sh | ||
```bash | ||
hub alias | ||
hub alias -s | ||
# this will show the output suitable for eval i.e output you can add to bashrc or zshrc files | ||
|
@@ -138,7 +138,7 @@ Low-level GitHub API request interface. This is so powerful that you have the | |
power to extend any functionality that the GitHub api provides easily by passing | ||
the route excluding the `baseUrl=https://api.github.com`. | ||
|
||
```sh | ||
```bash | ||
# List collaborators: | ||
hub api repos/:user/:repo/collaborators | jq ".[].login" | ||
# Add collaborator: | ||
|
@@ -165,7 +165,7 @@ with `issues` or `pr`. Check the examples below for more clarification when | |
dealing with issues and pr. Another thing is the option to pass specific COMMIT | ||
SHA to open to a GitHub commit directly. | ||
|
||
```sh | ||
```bash | ||
hub browse | ||
# open https://github.com/YOUR_USER/CURRENT_REPO | ||
|
||
|
@@ -194,7 +194,7 @@ hub browse resque network | |
- `hub ci-status` - This will help to display status of GitHub checks for a | ||
commit if it run any form of ci like GitHub actions and the likes. | ||
|
||
```sh | ||
```bash | ||
hub ci-status [commit] | ||
# (prints CI state of commit and exits with appropriate code) | ||
# One of: success (0), error (1), failure (1), pending (2), no status (3) | ||
|
@@ -205,7 +205,7 @@ hub ci-status [commit] | |
Open a GitHub compare page in a web browser. Compare a branch with the default | ||
branch or compare tags and releases | ||
|
||
```sh | ||
```bash | ||
# compares refactor with the default branch | ||
hub compare refactor | ||
# open https://github.com/CURRENT_REPO/compare/refactor | ||
|
@@ -228,7 +228,7 @@ Create a new repository on GitHub and add a git remote for it. It is as simple | |
as that. If you have even tried to setup your code on GitHub then you will | ||
appreciate this one line command to create a GitHub repository. | ||
|
||
```sh | ||
```bash | ||
hub create <reponame> | ||
# if reponame is not added then the name of the folder is used | ||
[ repo created on GitHub ] | ||
|
@@ -250,7 +250,7 @@ git remote add origin [email protected]:sinatra/recipes.git | |
|
||
Delete a repository on GitHub. | ||
|
||
```sh | ||
```bash | ||
hub delete reponame | ||
|
||
hub delete ORG/reponame -y | ||
|
@@ -261,7 +261,7 @@ hub delete ORG/reponame -y | |
|
||
Fork the current repository on GitHub and add a git remote for it. | ||
|
||
```sh | ||
```bash | ||
hub fork | ||
# user manually doing this will have to run the following steps below | ||
[ repo forked on GitHub ] | ||
|
@@ -279,7 +279,7 @@ You can access all the powers of GitHub gists. Do you know you can use `npx` to | |
run gists? even when npm packages. I will write about how to do that and share | ||
the url as well. | ||
|
||
```sh | ||
```bash | ||
hub gist create test.graphql | ||
# this command looks for a test.graphql file and put it into a git with a public shareable link | ||
``` | ||
|
@@ -290,7 +290,7 @@ Create a GitHub Pull Request whether from standard input of file or default | |
editor you can created a pull request without going to GitHub.Examples of | ||
commands to create Pull Requests. | ||
|
||
```sh | ||
```bash | ||
# while on a topic branch called "feature": | ||
hub pull-request | ||
[ opens text editor to edit title & body for the request ] | ||
|
@@ -303,7 +303,7 @@ $ hub pull-request -m "pull request title " -b base-branch -h feature-branch | |
- `hub pr` - Manage GitHub Pull Requests for the current repository. List , | ||
checkout and show pr using this command. | ||
|
||
```sh | ||
```bash | ||
# will list all the pr on the repository | ||
hub pr list | ||
|
||
|
@@ -324,7 +324,7 @@ almost the same principles of `pr` and `pull-request` i.e the showing with issue | |
number, creating with -m "test" or standard input or text editor, listing all | ||
the available issues. | ||
|
||
```sh | ||
```bash | ||
hub issue list | ||
|
||
hub issue show #issue-number | ||
|
@@ -349,7 +349,7 @@ follows the hub standard of creating, listing, edit and delete. | |
|
||
Fetch git objects from upstream and update local branches. | ||
|
||
```sh | ||
```bash | ||
hub sync | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ To create a project with vitejs, all you need to do is to copy and paste this in | |
your command line or terminal utility. The name of the folder your app will be | ||
created in is `react-typescript-playground`. | ||
|
||
```sh{3,6,10} | ||
```bash{3,6,10} | ||
# react-typescript-playground will be the name of the project | ||
# I prefer yarn but if you like npm check how to use npm in place of yarn here | ||
# https://classic.yarnpkg.com/en/docs/migrating-from-npm/#toc-cli-commands-comparison | ||
|
@@ -71,7 +71,7 @@ a project setup for you to play with. Change directory into the new create app | |
folder and run the yarn command to install the project dependencies. For vitejs | ||
the dependencies is minimal. | ||
|
||
```sh{2-4} | ||
```bash{2-4} | ||
# cd into the folder/project | ||
cd react-typescript-playground | ||
# run npm install or yarn to install the dependencies | ||
|
@@ -105,7 +105,7 @@ understands. We need to install | |
jest to understand our css module file - `app.css` file and we can mock out the | ||
files (svg and others) we use in our great counter app. | ||
|
||
```sh | ||
```bash | ||
yarn add -D [email protected] @types/jest @[email protected] @testing-library/react @testing-library/js-dom | ||
``` | ||
|
||
|
@@ -250,7 +250,7 @@ start migrating to setup with babel-jest. | |
|
||
Here is the code to commit your changes and create a new branch. | ||
|
||
```sh | ||
```bash | ||
git add . | ||
git commit -m "writing test using `ts-jest`" | ||
git checkout -b "babel-jest" | ||
|
@@ -267,7 +267,7 @@ frontend app you can plan to write one. it increases your confidence. | |
|
||
- install the necessary babel packages | ||
|
||
```sh{1} | ||
```bash{1} | ||
yarn add -D @babel/core @babel/preset-env @babel/preset-react @babel/preset-typescript babel-jest | ||
# add the @babel/plugin-transform-runtime to avoid the runtime error. | ||
yarn add -D @babel/plugin-transform-runtime | ||
|
Oops, something went wrong.