######################### gitあれこれ ######################### :small:`created at 2019-08-23 07:12+0900` ************************* gitignore設定 ************************* github/gitignore からお手本を拝借する。 * A collection of useful .gitignore templates * https://github.com/github/gitignore OSと汎用的に使うテキストエディタ関係の定義はグローバル設定に入れる。 .. code-block:: bash { echo "##### get from https://github.com/github/gitignore at $(date +'%Y-%m-%d %H:%M:%S'). start ######" echo "##### MacOS ################################################" curl -L https://github.com/github/gitignore/raw/master/Global/macOS.gitignore echo echo "##### Vim ##################################################" curl -L https://github.com/github/gitignore/raw/master/Global/Vim.gitignore echo echo "##### get from https://github.com/github/gitignore at $(date +'%Y-%m-%d %H:%M:%S'). End ######" echo } > ~/.config/git/ignore プロジェクトごとに使うIDEに合わせてローカルのexcludeへ入れる。 .. code-block:: bash # なかったら作る ls -la .git/info/exclude mkdir -p .git/info # Xcodeの場合 curl -L https://github.com/github/gitignore/raw/master/Global/Xcode.gitignore >> .git/info/exclude # PyCharmの場合 curl -L https://github.com/github/gitignore/raw/master/Global/JetBrains.gitignore >> .git/info/exclude echo "#### Python ####" >> .git/info/exclude curl -L https://github.com/github/gitignore/raw/master/Python.gitignore >> .git/info/exclude # Anddoid Studioの場合 curl -L https://github.com/github/gitignore/raw/master/Android.gitignore >> .git/info/exclude # Eclipseの場合 curl -L https://github.com/github/gitignore/raw/master/Global/Eclipse.gitignore >> .git/info/exclude # Unityの場合 curl -L https://github.com/github/gitignore/raw/master/Unity.gitignore >> .git/info/exclude プロジェクト固有の無視設定は.gitignoreへ入れる .. code-block:: bash echo 'mypoem.txt' >> .gitignore ************************* git-secrets を使う ************************* See also :doc:`04_git_secrets` ************************* 覚えられないgit コマンド ************************* See also :doc:`../command/02_git_command` ************************** 参考サイト ************************** * Gitを使ったバージョン管理|サルでもわかるGit入門【プロジェクト管理ツールBacklog】 * https://backlog.com/ja/git-tutorial/intro/01/ * ファイルの無視 -- Git - 変更内容のリポジトリへの記録 * https://git-scm.com/book/ja/v2/Git-の基本-変更内容のリポジトリへの記録#r_ignoring * Git - gitignore Documentation * https://git-scm.com/docs/gitignore