Skip to content

This project contains command line shortcuts for git and maven which can be used on command line. These shortcuts are created for both Windows and Linux.--

Notifications You must be signed in to change notification settings

syedumerahmedcode/technical-shortcuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Technical shortcuts

Table of content

Introduction

This project contains a list of shortcuts to technical commands that one can use to refer to them quickly. This project contains shortcuts to maven commands and git commands.

Technologies Used

  • Linux bash: Used for writing Linux bash scripts.
  • Windows bat: Used for writing Windows specific bat files.

Linux

In order for the command to run directly, one needs to define an alias in the user's local bashrc file. In order to do that, do the following:

  • Run the foloowing command:

vim ~/.bashrc

  • Find the section in the file where aliases are defined.

  • Define the alias as the following:

alias mci='bash /path/to/the/project/linux/mvn/mci.sh'
alias mc='bash /path/to/the/project/linux/mvn/mc.sh'
alias mcist='bash /path/to/the/project/linux/mvn/mcist.sh'
alias mi='bash /path/to/the/project/linux/mvn/mi.sh'
alias msbr='bash /path/to/the/project/linux/mvn/msbr.sh'
alias mt='bash /path/to/the/project/linux/mvn/mt.sh'
and so on...

Please note that writing bash before the complete path of the script is necessary. Otherwise, the alias cannot be executed like a bash command.

Same procedure should be followed for git shortcuts.

Maven Commands

Following table shows the shortcuts and their meanings:

Shortcut Meaning
mci mvn clean install
mc mvn clean
mcist mvn clean install -DskipTests
mi mvn install
msbr mvn spring-boot:run
mt mvn test -Dtest=$1
mjr mvn jetty:run $1

Please note that after a shortcut is called from the command line, it is echoed on the terminal.

Git commands

Following table shows the shortcuts and their meanings:

Shortcut Meaning
gaa git add .
gai git add [filename]
gcf git commit -m"feature: [You commit message]"
gct git commit -m"test: [You commit message]"
gp git push
gpl git pull
grh git reset --hard
gs git status
gbsc git branch --show-current

Windows

In order for the shortcuts to run directly, one needs to put these files in mvnShortcuts and gitShorcuts folder somewhere on their machine. After that, one can create an entry in the Path as an environment variable. This way, one can run the shortcuts directly from the command line.

Please note that maven and git shorcuts are very similar in both Windows and Linux folder within this project. However, some parts differ from one another. Hence, before using either of them, please go through the bat and/or sh files first so that the general idea of them is clear.

Contribution

Feature requests, issues, pull requests and questions are welcome. -

Contact Information

How to reach me? At github specific gmail account. Additionally, you can reach me via Linkedin or at Xing.

About

This project contains command line shortcuts for git and maven which can be used on command line. These shortcuts are created for both Windows and Linux.--

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published