いままで仕事で利用したバージョン管理システムは、こんな感じ。
- VSS
- CVS
- Git
- VSS (!)
今、まさに、VSSとか、、黒歴史になりそう。。それはさておき、プライベートだと、GitかSubVersionなのだが、仕事でGitを使わなくなってしまって、忘れがちになってきたので改めて復習の意味で読んでみた。
アリスとボブのGit入門レッスン
以下は、出てきたgitコマンドを読みながらメモったもの。
- git add
- git commit ※コミットメッセージを保存しなかった場合(空の場合)はコミットされない
- git commit -m "xxxxxx"
- git log
- git log --oneline
- git diff
- git checkout
- git config --global user.name "なまえ"
- git config --global user.email "namae@example.com"
- git commit --amend --reset-author ※直前のコミットのAuthorを修正する
- git add .
- git commit -a -m "xxxxx" ※-aオプションで追加されるのは、既にリポジトリにaddしてあるファイルのみ
- git show
- git reset HEAD sample.txt
- git status
- git reset --hard HEAD ※gitが追跡しているすべてのファイルが最新のコミットの状態になる
- git reset -h
- コミットメッセージ例
1行目に要約したタイトル
2行目に空行
3行目に詳細な内容を書く
- git commit --amend ※コミットメッセージを修正
- git rm
- git mv
- git add -A
- git reset --hard HEAD~
- git reset --hard HEAD^
- git rm --cached
- git config --global core.excludesfile
- git revert
- git rebase
- git rebase --abort
- git rebase --continue
- git log --oneline --decorate
- git pull
- git config -l
- git pull origin master
- git remote add
- git fetch
- git branch
- git commit -am
- git checkout master
- git branch -r
- git log --oneline --graph --decorate -- all
- git merge
- git log --graph --all --format="yyyyyy"
- git help log
- git config --global color.ui auto
- git config --global log.decorate short
- git init --bare --shared
- git push --all
- git tree
- git checkout -b
- git update-server-info
- git daemon
- git daemon --export-all
- git tag
- git tag -a
- git tag -n
- git tag -l -n
- gti tag -d
- git push --tags
- git add -p
- git branch -d
- git branch -d -r
- git branch -a
- git remote show origin
- git remote prune origin
- git fetch --prune
- git stash
- git stash list
- git stash pop
- git stash apply
- git stash save
- git for-each-ref
- git update-ref
- git remote add
- git checkout --theirs
- git rebase
- git rebase --continue
- git merge
- git reflog
- git --filter-branch --env-filter
- git log --pretty=short
- git --filter-branch --commit-filter
- git filter-branch -f --commit-filter
- git push -u
- git push -u --all
- git config ※リポジトリ内
- git config --global ※ログインユーザ環境
- git config --system ※OS環境全体
- git config --global core.editor
- git-completion.bash
- git status
- git add -i
- git ls-files -s
- git rev-list
- git cat-file
- git symbolic-ref
- git fsck