Code Monkey home page Code Monkey logo

git_alias's Introduction

Personal library aliases for git defined

👀 View current aliases

git config --global -l


📚 Alias Library

  • git current: Query the name of the current branch
  • git last: Query info of the last commit
  • git undo: Rollback last changes
  • git done: Push to non-remoted branch
  • git history: Display all branches like graph
  • git remove: Remove specific branch


⚙️ Bulk installation

First step, open editor:

git config --global -e

Second step, paste next lines:

[alias]
 current = rev-parse --abbrev-ref HEAD
 last = log -1 HEAD --stat
 undo = reset HEAD~1 --mixed
 done = !git push origin HEAD
 history = log --all --graph --decorate --oneline --simplify-by-decoration
 remove = branch -d


⚒️ Cherry-pick Installation

Query the name of the current branch

git config --global alias.current 'rev-parse --abbrev-ref HEAD'

Query info of the last commit

git config --global alias.last 'log -1 HEAD --stat'

Rollback last changes

git config --global alias.undo 'reset HEAD~1 --mixed'

Push to non-remoted branch

git config --global alias.done '!git push origin HEAD'

Display all branches like graph

git config --global alias.history 'log --all --graph --decorate --oneline --simplify-by-decoration'

Remove specific branch

git config --global alias.remove 'branch -d'

git_alias's People

Contributors

juananrodriguez avatar

Stargazers

Diego avatar Roman avatar María Ozámiz avatar

Watchers

James Cloos avatar  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.