0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

コピペで練習 git ファイルの変更と戻し

Last updated at Posted at 2022-08-20
# クローン
git clone https://github.com/tatsujihatanaka/lookaround.jp.git

# フォルダへ移動
cd lookaround.jp/

# 状態確認と以前の練習の後始末
git status
git branch -a
git branch -d -r origin/test
git push --delete origin test

# ブランチの作成・確認・削除
git branch test
git branch -a
git branch -d test
git branch -a

# ブランチの削除切替と切替
git checkout -b test
git branch -a
git checkout main
git branch -a
git checkout test

# 未追跡(untracked)ステージング前のファイル
# ファイルの追加・変更・戻し
touch test.txt
mkdir test
touch test/test.txt
sed -i -e 's/パノラマ</パノラマ test</g' views/index.php
git status
git clean -dn
git clean -df .
git status
git clean -dn
git checkout .

# 追跡(tracked)ステージングされたファイル
# ファイルの追加・変更・戻し
touch test.txt
mkdir test
touch test/test.txt
sed -i -e 's/パノラマ</パノラマ test</g' views/index.php
git status
git add .
git status
git rm -r --cached .
git status
git clean -dn
git clean -df .
git status
git reset --hard
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?