Posts

Learn to setup Git on your machine

Image
Hello readers, This post is targeted for folks who are planning to setup dual Git accounts on their machine. In this post, I will show you steps on getting your machine linked with two different Git accounts at the same time. Once done, you will be able to continue with coding work for your personal and work accounts simultaneously. For reference, let's assume we have a personal Git account as john@github.com and a work Git account as john@xyz.us . Replace these example email addresses with real ones during implementation. We will setup Git in a way that you can quickly toggle between these two email addresses at will and continue with your personal or professional work. First step is to ensure you have Git already installed on your machine. Open up the terminal and run following command: git -version Once you have confirmed that Git is present, let us generate SSH keys for each Git account. To do that, run following command: ssh-keygen -t rsa -C "john@github.com" Above