---
# System prepended metadata

title: git cmd

---

# git cmd

---
**Content**

[TOC]

---

## basic cmd

#### create repository folder
```shell=
D:
```
> to D disk
```shell=
D:\!code\gitRepo
```
> to git repo folder
```shell=
mkdir D:\!code\gitRepo\helloWorld
```
> create a project folder
```shell=
cd D:\!code\gitRepo\helloWorld
```
> to the project folder
#### initialize
```shell=
git init
```
#### ls/status
```shell=
git status
```
#### add file
```shell=
git add <filename.extension>
```
> e.g: git add helloWorld.cpp
#### commit
```shell=
git commit -m "commit"
```
> e.g: git commit -m "ver 1.0 :framework"
#### log
```shell=
git log
```
#### remote
```shell=
git remote add <name> <site>
```
> e.g: git remote add helloWorld `https://github.com/JelyFishhhhhh/helloWorld.git`
```shell=
git remote
```
#### push
```shell=
git push -u <remoteCase> <branch>
```
> e.g: git push -u helloWorld master
> -u = set branch & case default
```shell=
git push
```
> only use at default been set