Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Odchudzanie .gitignore

Krzysztof Wawer
April 23, 2014
140

Odchudzanie .gitignore

Krzysztof Wawer

April 23, 2014
Tweet

Transcript

  1. Odchudzanie .gitignore
    Krzysztof Wawer
    !
    github.com/wafcio
    [email protected]

    View Slide

  2. Projekt kilkuosobowy
    .DS_Store
    *.tmproj
    .nbproject
    X
    *.swp

    View Slide

  3. Projekt kilkuosobowy
    .DS_Store
    *.tmproj
    .nbproject
    X
    .idea
    *.swp

    View Slide

  4. Własne projekty
    .DS_Store
    *.swp
    X
    .DS_Store
    *.swp
    .DS_Store
    *.swp

    View Slide

  5. Dobra praktyka
    „You should not use .gitignore files within the repository to ignore
    files that only appear for you, such as editor-specific swap files. You
    should be placing those rules in a global .gitignore file so that they
    apply to all repositories, or in .git/info/excludes”
    Matthew Eagar (meagar)
    !
    http://stackoverflow.com/questions/6626136/best-practice-for-
    adding-gitignore-to-repo

    View Slide

  6. ‣ In the file .git/info/exclude - Pattern which are specific to a
    particular repository but which do not need to be shared with
    other related repositories (er. auxiliary files that live inside the
    repository but are specific to one user’s workflow)
    ‣ In the configuration variable core.excludesfile - Patterns
    which a user wants GIT to ignore in all situations (e.g.,
    backup or temporary files generated by the user’s editor of
    choice). Note that you can set the global config value, so
    every single project you work on will always ignore those
    pesky files such as Thumbs.db
    Adreas Renberg (IQAndreas)
    http://blog.iqandreas.com/git/best-practices-for-git-ignore/
    Dobra praktyka

    View Slide

  7. .gitignore w projekcie
    Ruby on Rails
    # See http://help.github.com/ignore-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'
    !
    !
    Ruby on Rails >= 3.1.2
    18 październik 2011

    View Slide

  8. Przykład: Virtus
    https://github.com/solnic/virtus

    View Slide

  9. https://github.com/thoughtbot/shoulda
    Przykład: Shoulda

    View Slide

  10. https://github.com/plataformatec/devise
    Przykład: Devise

    View Slide

  11. rvm vs rbenv
    ‣ .rvmrc
    ‣ .ruby-gemset
    ‣ .ruby-version
    !
    ‣ .ruby-version

    View Slide