このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 31 CentOS5 TLS1.2 created
- 2024.04.12 MySQL BIT Field created
- 04 ↷ 50_dialy:2024:04:04 から 50_dialy:2024:04:05 へページを名称変更しました。
最近の更新
文書の過去の版を表示しています。
git log --stat git log --name-status git log --name-only
# 全ファイルをステージングから取り除く。ファイルの変更はそのまま残す
$ git reset
# 指定したファイルをステージングから取り除く。ファイルの変更はそのまま残す
$ git reset ファイル名
# 全ファイルをステージングから取り除く。ファイルの変更した箇所も変更前に戻す
$ git reset --hard
$ git checkout [SHA] -example $ git checkout 7ffe59019ca83c95a89faf62bfd90290157574ef
resetで–hardオプションだと、引数にファイル名を指定できません。
そのため、特定ファイルのみを戻す場合は、checkoutを利用します。
$ git checkout HEAD ファイル名
ブランチ確認
$ git branch -a
ブランチ作成
$ git branch test_branch
ブランチ削除
$ git branch -d test_branch
ブランチ切り替え
$ git checkout test_branch
$ git commit --amend --author="Hoge Hoge <hoge@hoge.com>" $ git rebase --continue
# git config -l http.sslverify=false user.name=Shinya Matsui user.email=matsui@fl8.jp core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=ssh://gitprep@xx.xxx.xxx.xxx/pcg/git-test.git branch.master.remote=origin branch.master.merge=refs/heads/master