ディレクトリを作る。
1 |
git clone -b master git://github.com/weepingdoll/ryo.git rite |
ブランチを切る。
1 |
git checkout -b rite master |
他人の変更を取り込む。
1 2 3 4 |
git branch git fetch git diff origin:master --color git merge origin:master |
自分の変更を登録する。
1 2 3 4 5 |
git status git add . git status git commit -m "○○○○を変更" git push origin rite |
commitメッセージを変更
1 |
git commit --amend -m "変更するメッセージ" |
コミットを取り消し(ステージに戻る)。
1 |
git reset --soft HEAD^ |
間違えてgit addしたファイルを取り消し。
1 |
git reset HEAD^ file |
ファイルを削除
1 |
git rm file |
git rmの取り消し
1 2 3 |
### checkoutも必要。これコンフリクト解消でよく使う(一回消して再コミットすれば直る) git reset HEAD file git checkout file |