Skip to content

Git starter contains basic and recommended Git configurations

License

Notifications You must be signed in to change notification settings

pheus/git-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Git Starter

This Git repository contains basic and recommended Git configurations in addition to useful web URLs.

Git configuration

Basic settings

At least every user should configure her/his name and a commit email address. These settings can be configured globally with the --global parameter and will be saved in the user's root directory (~/.gitconfig):

git config --global user.name "firstname lastname"
git config --global user.email [email protected]

Recommended settings

The recommendation for an additional configuration includes:

  • Global gitignore file (gitignore)
  • Commit message template (gitmessage)
  • Default branch changed to main (from 'master') (requires Git 2.28+)
  • Simple push (only push current branch)
  • Recursive submodule init

The basic and recommended settings are provided in the file gitconfig-recommendations. Please change the user settings if the content is copied.

Optional settings

Some additional settings are included in the gitconfig-complete configuration template (like aliases and color settings).

Usage of provided configurations

The global configurations are a user-specific settings found in the user home directory (~/) (or in the User folder for Windows, e.g. C:\Users\<YourName>)

  1. Copy either gitconfig-recommendations or gitconfig-complete to ~/.gitconfig (or ~/.config/git/config)
  2. Replace username and commit email address in ~/.gitconfig (or ~/.config/git/config) directly or via git config commands
  3. Copy gitignore to ~/.gitignore
  4. Copy gitmessage to ~/.gitmessage

Useful resources

Git basics:

Best practices:

About

Git starter contains basic and recommended Git configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published