LoginSignup
8
8

More than 5 years have passed since last update.

たまーに使うGitコマンドのメモ

Last updated at Posted at 2014-07-17

GitHubからリポジトリ取得

変更部分を取得

$ git fetch

ログを見る場合

$ git log FETCH_HEAD

ログを見る場合

$ git diff FETCH_HEAD

サーバーに反映

$ git merge FETCH_HEAD

Gitの管理対象を外す

特定のファイルだけ

$ git rm <ファイル名>

フォルダごと管理から外す

$ git rm -r --cached <フォルダ名>

リジェクトした時

Please, commit your changes or stash them before you can merge.
これが出た時。

いまの作業ディレクトリの変更を退避

$ git stash save

最新の状態を持ってきてマージ

$ git pull

退避させた作業ディレクトリの変更を削除

$ git stash clear

上記はcommitしてない中途半端な修正を打ち消して、最新の状態に保つ方法。

8
8
1

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
8
8