Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Tuesday, July 7, 2015

svn -> git

Thursday, April 3, 2014

git command

Sunday, January 20, 2013

git config

Gitの構成の参照/設定


構成ファイルの対象を指定
--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)

リポジトリを作ったら、まず設定を行う
$ git config --global user.name "username"
$ git config --global user.email "dummy@gmail.com"
$ git config --global color.ui auto

設定は↓のコマンドで確認できる
$ git config --list
or
$ 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とちょっと似てるからいいけど、いきなりこれやったら覚えられなさそう

BitbucketでGit(1)

早速Bitbucketにユーザ登録をして、リポジトリを作ってみる


Name だけとりあえず決めて、後は適当に
Repository type 以外は後で変更できるみたいなので

Saturday, January 19, 2013

Git

今までSVNにいっぱいいっぱいだったので、ようやくGITに手を出してみる

有名なところでGitHubだと非公開なレポジトリを無料で作れないみたいなので、無料で作れるBitbucketを使ってみる(とりあえず使ってみたいだけなので