Git aliases for windows
So i just made a switch as you all know to a pretty great company which works with cars.
But while i got onboarded i was given a windows - weird i thought - maybe its just for start and then they will switch it with a mac as i have been working on till now i thought in my mind.
Fast forward to 2 months in and i got to know it is what i will be getting .
So being a crazy kid that i am i thought lets configure this machine as my mac used to be .
Turned out its also pretty easy to configure and so the first thing i like to do while setting any machine up for myself is installing git and then making my own aliases for all things (I know i am a lazy guy but yeah which dev isnt )
So let me show you how i did it for windows and how you can do so as well
First lets understand what aliases mean
As the name suggest its a shortcut for anything you want to have - in this case what i wanted is instead of writing
git checkout -b "feature/main"
i would rather like to do it this way
gch "feature/main"
less words to type - fast - but yeah most important is its pretty cool when you do it infront of anyone they be like
Anyways lets get started
Alright - first thing first
Go to your terminal of choice (in my case powershell ) and type
if there already exists the file then you can skip the next step
Since the file didnt exist you need to create one
Now that the file is created you can do the following steps
Now inside of the file type your aliases like this
You can configure as per your convience - these above one's are the one's which i personally use.
you can add / remove as per your choice.
once done - save the file
Then reload the file using command
Close the terminal and open a new terminal
You are good to go now
You can enjoy the fun now .
I hope this brings value to your workflow and make it faster
Happy Coding .