Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Git standard configuration #2

Open
pyrech opened this issue Dec 17, 2015 · 6 comments
Open

[RFC] Git standard configuration #2

pyrech opened this issue Dec 17, 2015 · 6 comments
Labels

Comments

@pyrech
Copy link
Member

pyrech commented Dec 17, 2015

Should we establish a default configuration for git? Everybody would be free to use it / customize it / or discard it completly but this default config would probably be useful for newcomers. Something among:

~/.gitconfig

[core]
    excludesfile = ~/.gitignore
[alias]
    st = status
    df = diff
    co = checkout
    ci = commit
    br = branch
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative

[branch]
    autosetuprebase = always

~/.gitignore

.idea
.DS_Store
._*
.Spotlight-V100
.Trashes
.buildpath
.project
.settings

What do you think?

@pyrech pyrech added the GIT label Dec 17, 2015
@damienalexandre
Copy link
Member

I'm against the autosetuprebase,
otherwise it's a good suggestion.

All the files we suggest should also include FULL comments on each line to describe what's done.

@ternel
Copy link
Member

ternel commented Dec 17, 2015

I have for .gitignore, surely too restritive:

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
#*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

# IDE configurations #
#####################
.idea
.settings

# Pre commit configuration
#####################
.pre-commit-config.yaml

For .gitconfig:

[color]
    ui = auto
    diff = auto
    status = auto
    branch = auto
[core]
    whitespace = trailing-space,space-before-tab
[help]
    autocorrect = 1
[rerere]
    enabled = true

@damienalexandre
Copy link
Member

I also saw some projects with a .gitattributes,
see https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes ?

@franek
Copy link

franek commented Dec 23, 2015

We could add :

[push]
        default = current

This article is good :
http://www.git-attitude.fr/2013/04/03/configuration-git/

@damienalexandre
Copy link
Member

We still miss something for the global "gitignore". Maybe we should also ship a ".gitignore-joli", which can be set in our gitconfig? If someone want to do this! 👍

@joelwurtz
Copy link
Member

joelwurtz commented Sep 7, 2016

Missing a .gitattributes file which list files who should not be present when exporting a project which is really useful when packaging an application (like removing the tests, documentation, and others things which does not make sense in a production application)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants