1
0

Overview

Gitのコマンドについて記載する。

git

# Print logs stdout
git log

# Print logs stdout (oneline)
git log --oneline

# Print logs stdout (graph / oneline)
git log --all --graph --oneline

# initializing the repository
git init

# Print status stdout
git status

# Clone the remote repository to local repository
git clone <repository URL>

# Create new branch
git branch <branchname>

# Change to new branch
git switch <branchname>

# Create & change to new brance
git checkout -b <branchname>

# Add changed file
git add <file>

# Add all changed files
git add .

# ステージングしたファイルを削除する
git rm --cached <file>

# Commit & write message of added files
git commit -m <messages>

# Move specific commit
git checkout <numbers>
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0