Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts
Tuesday, July 7, 2015
Thursday, April 3, 2014
Friday, April 12, 2013
Sunday, January 20, 2013
git config
Gitの構成の参照/設定
構成ファイルの対象を指定
構成の設定/変更
構成の削除
構成(key)の参照
構成(list)の参照
とりあえず、個人情報設定だけは最初にしておいた方がよい(Logに使用される)
merge, comment 等で使用するエディタを変更する場合(デフォルトはvi)
参考
構成ファイルの対象を指定
| --system | : 全てのユーザ、リポジトリに対する設定ファイル(/etc/gitconfig) |
| --global | : 現在のユーザに対する設定ファイル(~/.gitconfig) |
| --local | : 現在のリポジトリに対する設定ファイル([repository path]/.git/config) |
構成の設定/変更
$ git config [key] [value]
構成の削除
$ git config --unset [key]
構成(key)の参照
$ git config [key]
構成(list)の参照
$ git config -l (or --list)
とりあえず、個人情報設定だけは最初にしておいた方がよい(Logに使用される)
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com
merge, comment 等で使用するエディタを変更する場合(デフォルトはvi)
$ git config --global core.editor emacs
参考
BitbucketでGit(2)
リポジトリを作ったら、まず設定を行う
設定は↓のコマンドで確認できる
リポジトリに登録したいディレクトリに移動して初期化
リモートリポジトリの登録(リポジトリのURLを省略できる?
登録されているリモートリポジトリを確認(-v で詳細
ローカルリポジトリの状態確認
ファイルを追加/修正した場合
変更をコミット
ローカルリポジトリをリモートリポジトリへpush(初回の場合は master を指定
以上で、Bitbucketの方にリポジトリが登録される
man もあるのでそれ見るのがいいかも
SVNとちょっと似てるからいいけど、いきなりこれやったら覚えられなさそう
$ git config --global user.name "username" $ git config --global user.email "dummy@gmail.com" $ git config --global color.ui auto
設定は↓のコマンドで確認できる
$ git config --listor
$ cat ~/.gitconfig
リポジトリに登録したいディレクトリに移動して初期化
$ cd tmp $ git init
リモートリポジトリの登録(リポジトリのURLを省略できる?
$ git remote add origin https://username@bitbucket.org/username/sample.git
登録されているリモートリポジトリを確認(-v で詳細
$ git remote -v
ローカルリポジトリの状態確認
$ git status
ファイルを追加/修正した場合
$ git add test.txt
変更をコミット
$ git commit -m update
ローカルリポジトリをリモートリポジトリへpush(初回の場合は master を指定
$ git push -u origin master
以上で、Bitbucketの方にリポジトリが登録される
man もあるのでそれ見るのがいいかも
$ man git-add $ git help add $ git add --help
SVNとちょっと似てるからいいけど、いきなりこれやったら覚えられなさそう
Subscribe to:
Posts (Atom)
