Git Product home page Git Product logo

git-config's Introduction

⚙️ 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

git-config's People

Contributors

dimanu-py avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.