初期設定
初期設定
% git config --global user.name "tokoyax" % git config --global user.email tokoyax@example.com % git config --global alias.co checkout % git config --global core.editor "vim"
初期化
% git init
git 管理対象から外すものを指定
% vim .gitignore
/vendor/bundle と /bundle_bin はその都度 bundle install する
# See https://help.github.com/articles/ignoring-files for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. /.bundle # Ignore the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp /bundle_bin /vendor/bundle doc/ *.swp *~ .project .DS_Store .idea .secret
ステージングエリアに上げる
% git add .
コミット
% git commit -m "Initialize repository"