Skip to content

dimanu-py/git-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

⚙️ Git Configurations ⚙️

Description

This repo contains my .gitconfig file with different options and aliases I've enabled.

Explanation

Core

Sets the pager to be delta instead of less

Warning

For this pager to work you need to first install it.

Alias

  • local-name: set a specific username different from global in a local folder
  • local-email: set a specific email different from global in a local folder
  • clear: reset directly the branch to HEAD
  • force: performs a forced push with lease
  • continue: continues a rebase in progress
  • stop: aborts a rebase in progress
  • showalias: shows all configured aliases
  • lg: prints the log with a custom format using --pretty
  • new: shows the commits in your HEAD that are not in main
  • missing: shows the commits in main that are not in HEAD
  • tree: shows git log as a graph
  • fixup: shortcut to not write commit --fixup every time
  • patch: shortcut to avoid writing add --patch every time

Tip

The new and missing commands are configured to run with master rather than main due to my job's typical branch naming. You should change it according to your specification.

Pull

Sets the default pull method to use rebase instead of merge.

Rebase

The autoStash option performs automatic stashs when we do a rebase and have unstaged files in the working directoy. Once the rebase is finished, the stash is poped automatically.

The autosquash option allow us to organize automatically commits we will want to squash with previous commits. This is done by commiting doing git commit --fixup <old_hash_commit_to_squash_with>

Reuse Recorded Resolution

Once enabled, the rerere feature will record solved conflicts so if we encounter them again git already knows how to act.

How to use it

You can clone this repository and copy the gitconfig file whenever you want.

To allow your machine's .gitconfig file to use (mainly) my aliases you should include the following in your .gitconfig file.

Note

This file tends to be in your home directory

[include]
  path = /path/to/my_gitconfig_file

About

Git configurations and aliases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published