PostList

레이블이 Git인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Git인 게시물을 표시합니다. 모든 게시물 표시

2022년 11월 15일 화요일

Git commit and push

git init -b main

git add .

git status

git commit -m "initial commit"

git push

2022년 11월 14일 월요일

Create a remote Git repository from a local one


1. run the following commands.

gh auth login

gh repo create 


ref:

1. https://cli.github.com/manual/gh_repo_create

2. https://docs.github.com/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github


Install gh on Mac OSX

Problem that we can solve: 

- command not found: gh

- command not found: brew


1. Press Command+Space and type Terminal and press enter/return key.


2. Copy and paste the following command in the Terminal app.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

and press enter/return key. Wait for the command to finish.


3. Copy and paste the following command in Terminal app.

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile


4. Copy and paste the following command:

brew install gh


5. If gh is still not working,

eval $(/opt/homebrew/bin/brew shellenv)


6. Copy and paste the following command:

brew install gh

 

ref: 

1. https://macappstore.org/gh/

2. https://apple.stackexchange.com/questions/148901/why-does-my-brew-installation-not-work