戻る
■コマンドでgitを操作する
バージョンを確認する git --version クローン git clone git@bitbucket.org:xxx/yyy.git /var/www/html 現在のブランチ名を表示 git branch もしくは git branch --contains もしくは git branch --contains=HEAD もしくは以下なら、他のブランチは除外して表示される git rev-parse --abbrev-ref HEAD ブランチを切り替え(切り替えられなければ、先にプルを行う) git checkout develop git checkout feature/zzz 上記で切り替えられなければ、以下のようにする(developブランチに切り替える場合) git checkout -b develop origin/develop git - fetchしたremoteブランチのトラッキングブランチがcheckout時に自動で生成されない - スタック・オーバーフロー https://ja.stackoverflow.com/questions/18047/fetch%E3%81%97%E3%81%9Fremote%E3%83%96%E3%83%A9%E3%83%B... プル git pull 他人の作業ブランチを取り込み git pull git checkout feature/zzz プッシュ(初回) git push --set-upstream origin feature/zzz プッシュ(2回目以降) git push 更新したファイルを表示 git status -bs 履歴を表示 git log git log --oneline --graph --decorate -10 プログラマはGit、デザイナーはFTPでアップロードする場合の例 http://qiita.com/irxground/items/80dc6432e7d9d2b8b2a9 git 管理をやめる https://qiita.com/b4b4r07/items/cac4abd9ae66537e2833 既存のディレクトリに git clone するには http://neos21.hatenablog.com/entry/2016/02/07/000000 既存ディレクトリにGitリモートリポジトリを適用 https://qiita.com/llhrkll/items/9b252348898d14ff90bf ※コミットがあるのでBitbucketでは無理かも SourceTreeの使い方 | 初心者が習得するべき基本操作(diff, stash, tag, revert, cherry-pick) - ICS MEDIA https://ics.media/entry/1365 シェルスクリプトで現在のブランチ名を取得する(git rev-parse) - ペンギン村 Tech Blog http://blog.penginmura.tech/entry/2018/01/12/093400 「git pull」した時に出る、commitエディタを表示しないようにする : 元うなぎ屋 http://snickerjp.blogspot.com/2015/04/git-pull-no-edit.html バージョン管理ツールのGitでよく使用するコマンドを1ページにまとめた便利なチートシート -GitSheet | コリス https://coliss.com/articles/build-websites/operation/work/frequently-used-commands-in-git.html Gitでやりたいこと、ここで見つかる - Qiita https://qiita.com/shimotaroo/items/b73d896ace10894fd290 現場で使用していたGitコマンド集 - Qiita https://qiita.com/osakanaaaa/items/544343005b7ffe2a3929