SQL ADVANCED (TRIGGERS)
SQL ADVANCED (TRIGGERS)
SQL ADVANCED (TRIGGERS)
GitHub
What is Git
Git is a tool you install on your computer. It helps you track changes to your files.
Git is a DVCS (Distributed Version Control System), everyone has their own copy
of the file. You can work on your copy, even without the internet. Later, everyone
shares their changes, and the project gets updated.
For Ubuntu:
For RHEL/CentOS:
Configure Git
Run these commands to configure Git on you local:
• Use the cd command to go to the folder you want to track with Git.
✓ cd my-project
✓ git init
This command sets up a new Git repository in the folder by creating a .git directory.
✓ ls -a
You should see a hidden .git folder. This indicates that the directory is now tracked by
Git.
To see the current state of files in the repository (tracked or untracked), run:
✓ git status
✓ git add .
After adding the file, commit it to save the changes locally with a message:
What is GitHub
GitHub is a website. It’s a place where you can upload your Git projects to the
internet. This lets you share your work with others or work together on the same
project.
GitHub is a hosting service for Git repositories. Git and GitHub work together,
but they are not the same thing.
1 ) SSH URL
2) HTTPS URL
✓ ssh-keygen
Add the SSH key to your GitHub account:
✓ cat id_rsa.pub
Go to GitHub > Settings > SSH and GPG keys > New SSH key, paste the key,
and save it.
Go to GitHub > Settings > Developer settings > Personal access tokens. Use
it as a password.
Copy the token and save for further use it won’t be visible again.
Go to your local Git and Run the command in your local Git repository:
▪ Always ensure you use the correct URL format based on your connection
method (SSH or HTTPS).
Now your file is being tracked by Git and, it will be available in your remote
repository(GitHub).
Git clone
git clone is a command used to copy a repository from GitHub to your computer.
When you clone a repository, you get a complete copy of all the files, commit history,
and branches. Think of it like downloading a project so you can work on it locally.
Public repositories are open to everyone, so you don’t need any special authentication
to clone them.
This will create a new folder with the same name as the repository, containing all the
files.
You can also check commit history using git log command
Cloning a Private Repository:
Private repositories require authentication since they are not open to everyone.
Using HTTPS:
Go to GitHub and open the private repository you want to clone.Copy the
Repository HTTPS URL
When it ask for, enter your GitHub username and personal access token instead
of a password. (GitHub no longer supports password authentication; you must
generate a personal access token.)
Now your private gitHub repository gets cloned in your local using HTTPS.
Using SSH:
Now your private gitHub repository gets cloned in your local using SSH.
Is git init needed for git clone?
Answer is No, git init is NOT needed before using git clone because:
we use git init when starting a new repository from scratch (not cloning). For
example, if you want to create a fresh project and track it with Git, you would first
run:git init.
Git Fork
A fork is like creating your own personal copy of someone else’s GitHub repository.
This copy is saved in your GitHub account, and you can make changes to it without
affecting the original repository.
Forking is useful when you want to contribute to an open-source project or create your
custom version of a repository.
Click the Fork button at the top right of the repository page on GitHub.
This creates a copy of the repository in your GitHub account.
--------------------------------------------------------------------------------------------------------