Github Handy References:

To cover day-to-day required gitHub actions and commands in one place.

SSH Setup Github :

1. Generate rsa public key

ssh-keygen -t rsa -b 4096 -C “therahulgoel@gmail.com”

2. start ssh agent in background

eval “$(ssh-agent -s)”

3. open ~/.ssh/config

4. To create new file If not available

touch ~/.ssh/config

5. Add below in config file and save

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

6. Add private key to config

ssh-add -K ~/.ssh/id_rsa

7. Add this ssh key to GitHub in Settings

Https Setup Github:

  1. Initialise git in local repo :

git init

2. Cloning a remote repo :

git clone https://github.com/therahulgoel/LeetCode-Swift.git

3. Adding all files to git in current directory :

git add — all

4. To commit your local changes

git commit -m “Enter your message”

5. To push local changes to remote

git push origin

6. To set username and email only for this repo :

git config user.name “therahulgoel”

git config user.email “therahulgoel@gmail.com”

Useful References:

  1. GUI based Git client SourceTree : https://www.sourcetreeapp.com

2. Standard git ignore file creation : http://gitignore.io

Computer Science Enthusiast | 8+ Year of Software Evolution | @Groupon, Paytm, Myntra-Jabong https://www.linkedin.com/in/rahul-goel-28735154/