What is Git?
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It allows multiple people to work on the same codebase at the same time and keep track of changes made by each individual.
Git commands:
git init
: Initialize a Git repository in the current directory.git clone [url]
: Clone a remote Git repository to your local machine.git add [file]
: Stage a file to be committed to the repository.git commit -m "message"
: Commit the staged changes with a descriptive message.git status
: Show the current status of the repository.git branch
: List all the branches in the repository.git checkout [branch]
: Switch to a different branch.git merge [branch]
: Merge changes from another branch into the current branch.git push
: Push committed changes to a remote repository.git pull
: Pull changes from a remote repository to your local machine.
What is Github?
GitHub is a web-based platform for software development that provides hosting for Git repositories, as well as a number of other features that make collaboration and project management easier.GitHub allows developers to store and manage their Git repositories online, making it easy to collaborate with others and share code. Users can create repositories to store their code, and they can also contribute to existing repositories by making pull requests, which allow other developers to review and merge their changes.
GitHub commands:
git remote add origin [url]
: Add a remote repository as the origin for the local repository.git push -u origin [branch]
: Push the local branch to the remote repository.git pull origin [branch]
: Pull changes from the remote repository to the local branch.git clone [url]
: Clone a remote Git repository to your local machine.git fork
: Create a copy of a repository in your own GitHub account.git pull-request
: Create a pull request to suggest changes to a repository.git issues
: View and manage issues (bugs, feature requests, etc.) associated with a repository.
Linux is a free and open-source operating system based on the Unix operating system. It was first released in 1991 by Linus Torvalds and has since become one of the most widely used operating systems in the world, powering everything from smartphones to servers.
Linux is known for its stability, security, and efficiency, and it is used in many mission-critical applications, such as servers and supercomputers. It is also popular among developers and other technical users, who appreciate its flexibility and the wide range of development tools and applications available for it.
File and directory management:
ls
: List files and directories in the current directory.cd [directory]
: Change to the specified directory.pwd
: Print the current working directory.mkdir [directory]
: Create a new directory with the specified name.touch [file]
: Create a new file with the specified name.rm [file]
: Remove the specified file.rm -r [directory]
: Remove the specified directory and its contents.cp [source] [destination]
: Copy the specified file or directory to the specified destination.mv [source] [destination]
: Move the specified file or directory to the specified destination.
System information and management:
top
: Display information about running processes.ps
: Display information about currently running processes.kill [process id]
: Send a signal to the specified process to terminate it.reboot
: Restart the system.shutdown
: Shut down the system.uname -a
: Display information about the system, including the kernel version and system architecture.
Package management:
apt-get [package]
: Install the specified package using the Advanced Packaging Tool (APT).apt-get update
: Update the list of available packages.apt-get upgrade
: Upgrade all installed packages to their latest versions.
Thank you for reading.