Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
25
Help us understand the problem. What is going on with this article?
@knchst

Gitの覚えるべきコマンド

More than 5 years have passed since last update.

覚えるべきGitコマンドをまとめてみます。

git revert <commit>
<commit>を取り消す為のコミットを作成

git reset
作業ディレクトリには変更も加えずステージエリアをリセット

git reset --hard
作業ディレクトリ及びステージエリアをリセット

git reset --hard <commit>
<commit>まで戻す

git clean -n
追跡対象外の削除されようとするファイルを表示

git clean -f
追跡対象外のファイルを削除

git merge --no-ff <branch>
早送りマージ可能でも三方向マージ

git stash
追跡しているファイルの現在の作業を退避

git stash -u
追跡していないファイルも退避

git stash list
stash一覧を表示

git stash pop
最新のstashを適用して削除

25
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
25
Help us understand the problem. What is going on with this article?