Skip to content

Git command examples (Based on git bash command)

MkChoi edited this page May 23, 2024 · 2 revisions

Creating a text file and pushing

$ git init $ echo "test123" >> readme.md
$ git add readme.md
$ git status
$ git commit -m "commit test"
$ git remote add origin git@github.com:BoxerChoi/React.git
$ git branch -M main
$ git push -u origin main

Creating & removing "main2" branch

$ git branch -M main2
$ git status
$ git checkout main
$ git branch -d main2
$ git push -d origin main2

Clone this wiki locally