git branch: Lists all local branches git checkout <branch_name>: Switches to an existing branch. This updates the working directory and the index to reflect the state of the specified branch, and moves HEAD to point to the tip of that branch. git merge is a Git command used to combine the changes from two or more development histories into a single, unified history. This is a fundamental operation in Git for integrating work from different branches. git status Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by gitignore[5]). The first are what you would commit by running git commit; the second and third are what you could commit by running git add before running git commit. git log Show commit logs git-init - Create an empty Git repository or reinitialize an existing one ls: Lists files and directories in the current directory. pwd: command in Linux stands for "print working directory." Its primary function is to display the full path of the current directory you are currently operating within in the terminal. cd: short for "change directory," is a fundamental shell command used to navigate the file system. It allows users to move between different directories (folders) within the operating system. mkdir: command in Linux is used to create new directories (folders) in the file system. rmdir: command in Linux is specifically designed for removing empty directories. cp command in Linux is used to copy files and directories. It duplicates content from a source location to a specified destination, leaving the original intact. mv: command in Linux is used for two primary functions: moving files and directories, and renaming files and directories. rm: command in Linux is used to remove or delete files and directories from the file system. It is a powerful command and should be used with caution, as deleted files are generally not recoverable, unlike moving them to a recycle bin. touch: standard command used in the UNIX/Linux operating system which is used to create, change and modify the timestamps of a file. cat: command in Linux is a versatile utility primarily used for concatenating files and printing their contents to the standard output. Its name is an abbreviation for "concatenate."
-
Notifications
You must be signed in to change notification settings - Fork 0
dionbdev/Module-1-Assignment-Linux-and-GIT-Command-Cheat-Sheet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Module 1 assignment of creating linux and git command cheat sheet
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published