Skip to content

Instantly share code, notes, and snippets.

@parallaxhub
Last active September 15, 2021 17:09
Show Gist options
  • Save parallaxhub/a934490d1d2fdee6326c2fabd2fa723b to your computer and use it in GitHub Desktop.
Save parallaxhub/a934490d1d2fdee6326c2fabd2fa723b to your computer and use it in GitHub Desktop.
Git+GitHub+GitLab
#!/bin/bash
Q: What is Git?
A: Git is a version control system.
Q: Example of Git use
A: See atatched images. We use Git to manage our training version control release which can be see here: https://github.com/SchoolOfFreelancing/Back-Office/releases
Q: How to install latest Git and how I can check which version installed into Ubuntu?
A: To install Latest Git Run:
sudo add-apt-repository ppa:git
sudo apt update
sudo apt install git
Q: How to check git version?
A: To check git version run:
git --version
Q: How to configure latest Git and how I can check git configuration?
A: To configure Git run:
sudo git config --global user.name "parallax"
sudo git config --global user.email "your email"
sudo apt update
Q: How to check git configuration?
A: To check git configuration run:
sudo git config --list
Q: How to generating a new SSH key and Add SSH Key into GitHub?
A: For generating a new SSH key run:
sudo -i
ssh-keygen -t rsa -b 4096 -C
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
Q: How to understand your SSH Key is working with GitHub and GitLab?
A: To understand your SSH Key is working with GitHub and GitLab run:
ssh -T [email protected]
ssh -T [email protected]
When you will see "You've successfully authenticated, but GitHub does not provide shell access" then understand your SSH Key is working with GitHub (see ss)
When you will see "Welcome to GitLab" then understand your SSH key is working with GitLab(see ss)
Q: How to see my SSH Key terminal?
A: To see your SSH key run below command:
cat /root/.ssh/id_rsa.pub
Q: How I can clone Ruby on Rails source code repository from GItHub? Ex: https://github.com/rails/rails
A: To clone ruby on rails source code repository into your PC use $ git clone command (see ss). Example:
$ git clone https://github.com/rails/rails.git
# https://youtu.be/G7T1Cim0xos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment