From a98d1e676407e618c76a4d7147955a9d94bc5076 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Tue, 7 Nov 2023 12:34:10 +0000 Subject: [PATCH 01/78] added file : python file for sorting has been added --- sorting.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sorting.py diff --git a/sorting.py b/sorting.py new file mode 100644 index 0000000..8fab8d4 --- /dev/null +++ b/sorting.py @@ -0,0 +1,2 @@ +lst = [i for i in range (20,0,-1)] +print(sorted(lst)) From 27c6eebed3d9e1ef2e907879ddd9e2d730a733b3 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Tue, 7 Nov 2023 12:41:45 +0000 Subject: [PATCH 02/78] feat: added some comments to the programme --- sorting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sorting.py b/sorting.py index 8fab8d4..4ab479f 100644 --- a/sorting.py +++ b/sorting.py @@ -1,2 +1,4 @@ -lst = [i for i in range (20,0,-1)] +# this programme will sort this list in ascending +lst = [i for i in range (20,0,-2)] print(sorted(lst)) + From b6b0497c14bdc5f1887bd04a424e7210cae4ec3c Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:42:33 +0000 Subject: [PATCH 03/78] Update README.md --- README.md | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 149 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 06f794a..ecc40a6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,150 @@ -# First git project +# README.md -Objectives: -* learn git commands -* learn how github works -* etc \ No newline at end of file +This README file contains important Linux and GitHub commands that you should know. + +## Table of Contents + +- [GitHub](#github) +- [Git](#git) +- [Linux Commands](#linux-commands) + +## GitHub + +- **Creating a Repository** + - To create a new repository on GitHub, go to your profile page and click on the green "New" button. + +- **Cloning a Repository** + - To clone a repository, open your terminal or command prompt and run the following command: + ``` + git clone https://github.com/username/repository.git + ``` + +- **Adding a File to the Repository** + - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: + ``` + git add filename + ``` + +- **Commiting Changes** + - After adding the file, you can commit the changes to the repository with the following command: + ``` + git commit -m "commit message" + ``` + +- **Pushing Changes to GitHub** + - To push the changes to the GitHub repository, run the following command: + ``` + git push origin master + ``` + +## Git + +- **Creating a New Branch** + - To create a new branch, run the following command: + ``` + git checkout -b branchname + ``` + +- **Switching Between Branches** + - To switch between branches, run the following command: + ``` + git checkout branchname + ``` + +- **Merging Branches** + - To merge a branch into the master branch, first switch to the master branch and then run the following command: + ``` + git merge branchname + ``` + +- **Deleting a Branch** + - To delete a branch, run the following command: + ``` + git branch -d branchname + ``` + +## Linux Commands + +- **Creating a New Directory** + - To create a new directory, run the following command: + ``` + mkdir directoryname + ``` + +- **Changing the Current Directory** + - To change the current directory, run the following command: + ``` + cd directoryname + ``` + +- **Listing the Contents of a Directory** + - To list the contents of a directory, run the following command: + ``` + ls + ``` + +- **Creating a New File** + - To create a new file, run the following command: + ``` + touch filename + ``` + +- **Viewing the Contents of a File** + - To view the contents of a file, run the following command: + ``` + cat filename + ``` + +- **Deleting a File or Directory** + - To delete a file or directory, run the following command: + ``` + rm -rf filename + ``` + +- **Searching for a File or Directory** + - To search for a file or directory, run the following command: + ``` + find / -name "filename" 2>/dev/null + ``` + +- **Downloading a File** + - To download a file, run the following command: + ``` + wget fileurl + ``` + +- **Extracting a Zip File** + - To extract a zip file, run the following command: + ``` + unzip filename.zip + ``` + +- **Compressing a Directory** + - To compress a directory into a zip file, run the following command: + ``` + zip -r filename.zip directoryname + ``` + +- **Moving a File or Directory** + - To move a file or directory, run the following command: + ``` + mv filename destination + ``` + +- **Renaming a File or Directory** + - To rename a file or directory, run the following command: + ``` + mv oldfilename newfilename + ``` + +- **Updating the System** + - To update the system, run the following command: + ``` + sudo apt-get update && sudo apt-get upgrade + ``` + +- **Checking the System's Uptime** + - To check the system's uptime, run the following command: + ``` + uptime + ``` From 215010f7330c41967f6aa87f16008a441373df55 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:44:40 +0000 Subject: [PATCH 04/78] Delete cutlery.txt --- cutlery.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 cutlery.txt diff --git a/cutlery.txt b/cutlery.txt deleted file mode 100644 index 2484235..0000000 --- a/cutlery.txt +++ /dev/null @@ -1,3 +0,0 @@ -fork: a -knife: b -spoon: c \ No newline at end of file From c8f27b16af6ea6e2a1365947b572a1e1f5a2a731 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:44:50 +0000 Subject: [PATCH 05/78] Delete vegetables.txt --- vegetables.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 vegetables.txt diff --git a/vegetables.txt b/vegetables.txt deleted file mode 100644 index e8fa5c7..0000000 --- a/vegetables.txt +++ /dev/null @@ -1,3 +0,0 @@ -kale -potato -carrot \ No newline at end of file From 5dd4a8156f9f72ecc0442b20a2275f8574eeb566 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:45:02 +0000 Subject: [PATCH 06/78] Delete sorting.py --- sorting.py | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sorting.py diff --git a/sorting.py b/sorting.py deleted file mode 100644 index 4ab479f..0000000 --- a/sorting.py +++ /dev/null @@ -1,4 +0,0 @@ -# this programme will sort this list in ascending -lst = [i for i in range (20,0,-2)] -print(sorted(lst)) - From 0d40305f201ae597793d31ec2898906fabff5dba Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:45:12 +0000 Subject: [PATCH 07/78] Delete fruits.txt --- fruits.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 fruits.txt diff --git a/fruits.txt b/fruits.txt deleted file mode 100644 index df152e4..0000000 --- a/fruits.txt +++ /dev/null @@ -1,5 +0,0 @@ -Apple -Banana -Pear -Peach -Tomato \ No newline at end of file From f57fb244a6b82f1cad466e2a54adf24ddc86707b Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:00:54 +0000 Subject: [PATCH 08/78] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ecc40a6..72f8b18 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,14 @@ This README file contains important Linux and GitHub commands that you should kn ``` git push origin master ``` - +- **Update your repo to the latest changes** + - If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. + ``` + git pull origin main + ``` + ``` + git pull https://github.com/user/repo.git master + ``` ## Git - **Creating a New Branch** From 9d0678d669b25f0edccbabbcf44552ec78b3eabe Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 09:59:08 +0000 Subject: [PATCH 09/78] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72f8b18..5b0acf4 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,19 @@ This README file contains important Linux and GitHub commands that you should kn ``` touch filename ``` - + +- **editing the file** + - To open and edit a file, run the following command: + ``` + vi filename + ``` + +- **opening a File in VSCode** + - To open a file inside VSCode, run the following command: + ``` + code filename + ``` + - **Viewing the Contents of a File** - To view the contents of a file, run the following command: ``` From 2b4224ac23b98987935fa444119fd453d2d51548 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:14:54 +0000 Subject: [PATCH 10/78] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5b0acf4..a950ef0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,19 @@ This README file contains important Linux and GitHub commands that you should kn - **Creating a Repository** - To create a new repository on GitHub, go to your profile page and click on the green "New" button. +- **set Git configuration** + - To set up github on the local git, open your terminal or command prompt and run the following commands: + ``` + git config --global user.name “-------” + git config --global user.email “------” + ``` + +- **set Git configuration** + - To check your github configuration on the local git, run the following commands: + ``` + git config --list + ``` + - **Cloning a Repository** - To clone a repository, open your terminal or command prompt and run the following command: ``` From 07932177ef4fb07c99941585bec4f1d3175ea9d4 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:50:34 +0000 Subject: [PATCH 11/78] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a950ef0..beb23fa 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ This README file contains important Linux and GitHub commands that you should kn - **Cloning a Repository** - To clone a repository, open your terminal or command prompt and run the following command: ``` - git clone https://github.com/username/repository.git + git clone git@github.com:username/repository.git ``` - **Adding a File to the Repository** @@ -55,7 +55,7 @@ This README file contains important Linux and GitHub commands that you should kn git pull origin main ``` ``` - git pull https://github.com/user/repo.git master + git pull git@github.com:username/repository.git master ``` ## Git From 7ef29865cdc219139f4f0b0c4be925dc96a97a04 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:01:37 +0000 Subject: [PATCH 12/78] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index beb23fa..7d51827 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,12 @@ This README file contains important Linux and GitHub commands that you should kn ``` - **Update your repo to the latest changes** - If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. - ``` - git pull origin main - ``` - ``` - git pull git@github.com:username/repository.git master - ``` + ``` + git pull origin main + ``` + ``` + git pull git@github.com:username/repository.git master + ``` ## Git - **Creating a New Branch** From 271743528ce6efd147f7460b8ff42683789de941 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:10:06 +0000 Subject: [PATCH 13/78] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d51827..4c44c74 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` git checkout branchname ``` - +- **current status of your working directory** + - This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. + ``` + git status + ``` - **Merging Branches** - To merge a branch into the master branch, first switch to the master branch and then run the following command: ``` @@ -82,6 +86,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` git branch -d branchname ``` +- **view the commit history** + - This will display a list of all the commits made to the repository, including the author, date, and commit message. + ``` + git log + ``` ## Linux Commands From 1d87466378d751739b140c1e64b017c36bde047c Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:42:04 +0000 Subject: [PATCH 14/78] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4c44c74..839d623 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` ## Git +- **Initializing a new repository** + - To create a new repository + ``` + git init + ``` - **Creating a New Branch** - To create a new branch, run the following command: ``` From d0a760dd0e28b6c627305e11bdcc16f0cc2c02d6 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:46:41 +0000 Subject: [PATCH 15/78] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 839d623..73d964f 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,17 @@ This README file contains important Linux and GitHub commands that you should kn ``` git log ``` - +## VSCode +- **Open VSCode using terminal** + - To open VSCode simply write: + ``` + code + ``` +- **Open a file using VSCode** + - To open a file using VSCode simply write: + ``` + code filename + ``` ## Linux Commands - **Creating a New Directory** From 14f592478094adc7608e52388b1517eb7956e3a5 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:15:52 +0000 Subject: [PATCH 16/78] Create BASHFILE.md --- BASHFILE.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 BASHFILE.md diff --git a/BASHFILE.md b/BASHFILE.md new file mode 100644 index 0000000..a6344a9 --- /dev/null +++ b/BASHFILE.md @@ -0,0 +1,41 @@ + + + Create a bash script file with the .sh extension. For example, my_script.sh. + + Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. + +bash + +#!/bin/bash + + Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. + +bash + +#!/bin/bash + + +echo "Hello, World!" + + +ls + + Save your script file. + + Open a terminal and navigate to the directory where your script file is located. + + Give the script file execute permissions by running the following command: + +bash + +chmod +x my_script.sh + + Now you can run your script by executing the following command: + +bash + +./my_script.sh + +This will execute your script and display the output in your terminal. + +Remember to replace my_script.sh with the actual name of your script file. From 53c18bf2e7aa0470341d80672d56748e1a2d6f3c Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:32:12 +0000 Subject: [PATCH 17/78] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 73d964f..453012a 100644 --- a/README.md +++ b/README.md @@ -204,3 +204,35 @@ This README file contains important Linux and GitHub commands that you should kn ``` uptime ``` +## Bashfiles +- **To create a bash script file with the .sh extension. For example, my_script.sh.** + - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. + ```bash + #!/bin/bash + ``` + - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. + + ```bash + #!/bin/bash + + echo "Hello, World!" + + ls + ``` + - Save your script file. + + - Open a terminal and navigate to the directory where your script file is located. + + - Give the script file execute permissions by running the following command: + + ```bash + chmod +x my_script.sh + ``` + - Now you can run your script by executing the following command: + +```bash +./my_script.sh +``` +- This will execute your script and display the output in your terminal. + +- Remember to replace my_script.sh with the actual name of your script file. From 49078a7ed8810e189eee7d49b3bfd528e14a64fa Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:32:37 +0000 Subject: [PATCH 18/78] Delete BASHFILE.md --- BASHFILE.md | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 BASHFILE.md diff --git a/BASHFILE.md b/BASHFILE.md deleted file mode 100644 index a6344a9..0000000 --- a/BASHFILE.md +++ /dev/null @@ -1,41 +0,0 @@ - - - Create a bash script file with the .sh extension. For example, my_script.sh. - - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. - -bash - -#!/bin/bash - - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. - -bash - -#!/bin/bash - - -echo "Hello, World!" - - -ls - - Save your script file. - - Open a terminal and navigate to the directory where your script file is located. - - Give the script file execute permissions by running the following command: - -bash - -chmod +x my_script.sh - - Now you can run your script by executing the following command: - -bash - -./my_script.sh - -This will execute your script and display the output in your terminal. - -Remember to replace my_script.sh with the actual name of your script file. From e0c5ef972af965c0f6d12dbc22d35a89655601f1 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:45:21 +0000 Subject: [PATCH 19/78] Update README.md --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 453012a..584a167 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ This README file contains important Linux and GitHub commands that you should kn - [GitHub](#github) - [Git](#git) +- [VSCode](#VSCode) - [Linux Commands](#linux-commands) +- [Bash Files](#Bash-Files) ## GitHub @@ -204,13 +206,13 @@ This README file contains important Linux and GitHub commands that you should kn ``` uptime ``` -## Bashfiles +## Bash Files - **To create a bash script file with the .sh extension. For example, my_script.sh.** - - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. + - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. ```bash #!/bin/bash ``` - - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. + - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. ```bash #!/bin/bash @@ -219,20 +221,20 @@ This README file contains important Linux and GitHub commands that you should kn ls ``` - - Save your script file. + - Save your script file. - - Open a terminal and navigate to the directory where your script file is located. + - Open a terminal and navigate to the directory where your script file is located. - - Give the script file execute permissions by running the following command: + - Give the script file execute permissions by running the following command: ```bash chmod +x my_script.sh ``` - - Now you can run your script by executing the following command: + - Now you can run your script by executing the following command: ```bash ./my_script.sh ``` -- This will execute your script and display the output in your terminal. + - This will execute your script and display the output in your terminal. -- Remember to replace my_script.sh with the actual name of your script file. + - Remember to replace my_script.sh with the actual name of your script file. From ad8f3d82bd1e21bcc2c5a2de731f162b750b85f5 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:51:52 +0000 Subject: [PATCH 20/78] Update README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 584a167..8ec4b79 100644 --- a/README.md +++ b/README.md @@ -210,12 +210,12 @@ This README file contains important Linux and GitHub commands that you should kn - **To create a bash script file with the .sh extension. For example, my_script.sh.** - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. ```bash - #!/bin/bash + #!/user/bin/bash ``` - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. ```bash - #!/bin/bash + #!/user/bin/bash echo "Hello, World!" @@ -238,3 +238,12 @@ This README file contains important Linux and GitHub commands that you should kn - This will execute your script and display the output in your terminal. - Remember to replace my_script.sh with the actual name of your script file. + - EXAMPLE: + ```bash + #!/user/bin/bash + greeting = "welcome" + user = $(whoami) + day = $(date + %A) + echo "greeting back $user! Today is $day, which is the best day of the entire week!" + echo "your bash shell version is $BASH_VERSION. Enjoy!" + ``` From a66c30a6fd9981d1cc94c74ab012f6ceffdb80f7 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:00:30 +0000 Subject: [PATCH 21/78] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ec4b79..f9411b1 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` git clone git@github.com:username/repository.git ``` - +- **connect to a remote repository on GitHub** + - Run this git command to connect your local Git repository to a remote repository on GitHub. + ```bash + git remote add origin git@github.com:username/repositoryname.git + ``` - **Adding a File to the Repository** - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: ``` From 3c1380a09b1ae76c12d32b9e4f10413b2ec1beb6 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:18:54 +0000 Subject: [PATCH 22/78] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f9411b1..8d00f10 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,9 @@ This README file contains important Linux and GitHub commands that you should kn ``` git merge branchname ``` + ``` + git merge branchname --no-edit -m "commit message" + ``` - **Deleting a Branch** - To delete a branch, run the following command: From 8a2b1410c921ea7591bbacfa8bed8216a621cda6 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Fri, 15 Dec 2023 19:14:34 +0000 Subject: [PATCH 23/78] Update README.md --- README.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8d00f10..fc94d36 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,13 @@ This README file contains important Linux and GitHub commands that you should kn ``` git clone git@github.com:username/repository.git ``` + - **connect to a remote repository on GitHub** - Run this git command to connect your local Git repository to a remote repository on GitHub. ```bash git remote add origin git@github.com:username/repositoryname.git ``` + - **Adding a File to the Repository** - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: ``` @@ -55,6 +57,7 @@ This README file contains important Linux and GitHub commands that you should kn ``` git push origin master ``` + - **Update your repo to the latest changes** - If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. ``` @@ -63,6 +66,7 @@ This README file contains important Linux and GitHub commands that you should kn ``` git pull git@github.com:username/repository.git master ``` + ## Git - **Initializing a new repository** @@ -70,6 +74,7 @@ This README file contains important Linux and GitHub commands that you should kn ``` git init ``` + - **Creating a New Branch** - To create a new branch, run the following command: ``` @@ -81,11 +86,13 @@ This README file contains important Linux and GitHub commands that you should kn ``` git checkout branchname ``` + - **current status of your working directory** - This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. ``` git status ``` + - **Merging Branches** - To merge a branch into the master branch, first switch to the master branch and then run the following command: ``` @@ -100,22 +107,27 @@ This README file contains important Linux and GitHub commands that you should kn ``` git branch -d branchname ``` + - **view the commit history** - This will display a list of all the commits made to the repository, including the author, date, and commit message. ``` git log ``` + ## VSCode + - **Open VSCode using terminal** - To open VSCode simply write: ``` code ``` + - **Open a file using VSCode** - To open a file using VSCode simply write: ``` code filename - ``` + ``` + ## Linux Commands - **Creating a New Directory** @@ -165,7 +177,17 @@ This README file contains important Linux and GitHub commands that you should kn ``` rm -rf filename ``` - + +- **Generate a new SSH key pair** + - This following command will generate a new SSH key pair. It creates a RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. + ```bash + ssh-keygen -t rsa + ``` + ```bash + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + ``` + - This command will generate a new SSH key pair. It creates a 4096-bit RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. The -C flag is used to add a comment, which is useful for identification purposes. + - **Searching for a File or Directory** - To search for a file or directory, run the following command: ``` @@ -213,6 +235,7 @@ This README file contains important Linux and GitHub commands that you should kn ``` uptime ``` + ## Bash Files - **To create a bash script file with the .sh extension. For example, my_script.sh.** - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. @@ -220,7 +243,6 @@ This README file contains important Linux and GitHub commands that you should kn #!/user/bin/bash ``` - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. - ```bash #!/user/bin/bash @@ -239,9 +261,9 @@ This README file contains important Linux and GitHub commands that you should kn ``` - Now you can run your script by executing the following command: -```bash -./my_script.sh -``` + ```bash + ./my_script.sh + ``` - This will execute your script and display the output in your terminal. - Remember to replace my_script.sh with the actual name of your script file. From 7cf22977d59170a24f160e8fd86d231dd859c2e1 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:17:25 +0000 Subject: [PATCH 24/78] Create gittable.md --- gittable.md | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 gittable.md diff --git a/gittable.md b/gittable.md new file mode 100644 index 0000000..8aa7b1d --- /dev/null +++ b/gittable.md @@ -0,0 +1,207 @@ + + + + + +

GIT CHEAT SHEET

+

STAGE & SNAPSHOT

+

Working with snapshots and the Git staging area

+ + + + + + + + + + + + + + + + + + + + + + + + + +
git statusshow modified files in working directory, staged for your next commit
git add [file]add a file as it looks now to your next commit (stage)
git reset [file]unstage a file while retaining the changes in working directory
git diffdiff of what is changed but not staged
git diff --stageddiff of what is staged but not yet commited
git commit -m “[descriptive message]”commit your staged content as a new commit snapshot
+

SETUP

+

Configuring user information used across all local repositories

+ + + + + + + + + + + + + +
git config --global user.name “[firstname lastname]”set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”set an email address that will be associated with each history marker
git config --global color.ui autoset automatic command line coloring for Git for easy reviewing
+

SETUP & INIT

+

Configuring user information, initializing and cloning repositories

+ + + + + + + + + +
git initinitialize an existing directory as a Git repository
git clone [url]retrieve an entire repository from a hosted location via URL
+

BRANCH & MERGE

+

Isolating work in branches, changing context, and integrating changes

+ + + + + + + + + + + + + + + + + + + + + +
git branchlist your branches. a * will appear next to the currently active branch
git branch [branch-name]create a new branch at the current commit
git checkoutswitch to another branch and check it out into your working directory
git merge [branch]merge the specified branch’s history into the current one
git logshow all commits in the current branch’s history
+

Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference.

+

INSTALLATION & GUIS

+

With platform specific installers for Git, GitHub also provides the ease of staying up-to-date with the latest releases of the command line tool while providing a graphical user interface for day-to-day interaction, review, and repository synchronization.

+ +

For Linux and Solaris platforms, the latest release is available on the official Git web site.

+

education@github.com

+

[4]

+

Education

+

Teach and learn better, together. GitHub is free for students and teachers. Discounts available for other educational uses.

+

SHARE & UPDATE

+

Retrieving updates from another repository and updating local repos

+ + + + + + + + + + + + + + + + + + + + + +
git remote add [alias] [url]add a git URL as an alias
git fetch [alias]fetch down all the branches from that Git remote
git merge [alias]/[branch]merge a remote branch into your current branch to bring it up to date
git push [alias] [branch]Transmit local branch commits to the remote repository branch
git pullfetch and merge any commits from the tracking remote branch
+

TRACKING PATH CHANGES

+

Versioning file removes and path changes

+ + + + + + + + + + + + + +
git rm [file]delete the file from project and stage the removal for commit
git mv [existing-path] [new-path]change an existing file path and stage the move
git log --stat -Mshow all commit logs with indication of any paths that moved
+

TEMPORARY COMMITS

+

Temporarily store modified, tracked files in order to change branches

+ + + + + + + + + + + + + + + + + +
git stashSave modified and staged changes
git stash listlist stack-order of stashed file changes
git stash popwrite working from top of stash stack
git stash dropdiscard the changes from top of stash stack
+

REWRITE HISTORY

+

Rewriting branches, updating commits and clearing history

+ + + -
From bcb3fcb61f175736a300045dec1cde10947d2545 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:18:47 +0000 Subject: [PATCH 25/78] Update gittable.md --- gittable.md | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/gittable.md b/gittable.md index 8aa7b1d..45e94e6 100644 --- a/gittable.md +++ b/gittable.md @@ -1,48 +1,6 @@ From b6e14b00a83ec45c0b2827a3ba5337e64c23ec26 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:22:02 +0000 Subject: [PATCH 26/78] Update gittable.md --- gittable.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/gittable.md b/gittable.md index 45e94e6..00dcc33 100644 --- a/gittable.md +++ b/gittable.md @@ -84,22 +84,6 @@ git log show all commits in the current branch’s history
-

Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference.

-

INSTALLATION & GUIS

-

With platform specific installers for Git, GitHub also provides the ease of staying up-to-date with the latest releases of the command line tool while providing a graphical user interface for day-to-day interaction, review, and repository synchronization.

- -

For Linux and Solaris platforms, the latest release is available on the official Git web site.

-

education@github.com

-

[4]

-

Education

-

Teach and learn better, together. GitHub is free for students and teachers. Discounts available for other educational uses.

-

SHARE & UPDATE

-

Retrieving updates from another repository and updating local repos

From 570a6b073168ee521ec984cc6d966d2c81a7712e Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:26:06 +0000 Subject: [PATCH 27/78] Update gittable.md --- gittable.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gittable.md b/gittable.md index 00dcc33..92cef6d 100644 --- a/gittable.md +++ b/gittable.md @@ -84,6 +84,8 @@ +

SHARE & UPDATE

+

Retrieving updates from another repository and updating local repos

git remote add [alias] [url]git log show all commits in the current branch’s history
From 2cd985f7eebacded83be692345e0a9ef47adeb27 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:28:17 +0000 Subject: [PATCH 28/78] Update gittable.md --- gittable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gittable.md b/gittable.md index 92cef6d..ddeec15 100644 --- a/gittable.md +++ b/gittable.md @@ -84,7 +84,7 @@ -

SHARE & UPDATE

+

SHARE & UPDATE

Retrieving updates from another repository and updating local repos

git remote add [alias] [url]git log show all commits in the current branch’s history
From 6624ac3d69cf802971965f882696ce76be059004 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:31:14 +0000 Subject: [PATCH 29/78] Update gittable.md --- gittable.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gittable.md b/gittable.md index ddeec15..da6185c 100644 --- a/gittable.md +++ b/gittable.md @@ -84,7 +84,7 @@ -

SHARE & UPDATE

+

SHARE & UPDATE

Retrieving updates from another repository and updating local repos

git log show all commits in the current branch’s history
@@ -148,4 +148,10 @@

Rewriting branches, updating commits and clearing history

- + + + + + + From e1894527ae899b367819f23cc4aed308da33c892 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:36:08 +0000 Subject: [PATCH 30/78] Update gittable.md --- gittable.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gittable.md b/gittable.md index da6185c..7b53984 100644 --- a/gittable.md +++ b/gittable.md @@ -84,6 +84,7 @@ +
+ git rebase [branch]apply any commits of current branch ahead of specified one
git reset --hard [commit]clear staging area, rewrite working tree from specified commit
git log show all commits in the current branch’s history

SHARE & UPDATE

Retrieving updates from another repository and updating local repos

From 6a84f0c97479a87fd3d19f62b51577d0d9a88b48 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:49:56 +0000 Subject: [PATCH 31/78] Update gittable.md --- gittable.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gittable.md b/gittable.md index 7b53984..52c77fa 100644 --- a/gittable.md +++ b/gittable.md @@ -1,7 +1,6 @@ - + GITHUB

GIT CHEAT SHEET

From a1bb9da963afa238b2022f8df3b5707726ebb7e7 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:27:54 +0000 Subject: [PATCH 32/78] Update gittable.md --- gittable.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gittable.md b/gittable.md index 52c77fa..5d55d2b 100644 --- a/gittable.md +++ b/gittable.md @@ -155,3 +155,44 @@ +
git reset --hard [commit] clear staging area, rewrite working tree from specified commit
+

IGNORING PATTERNS

+

Preventing unintentional staging or commiting of files

+ + + + + + + + + +
logs/ +*.notes +pattern*/Save a file with desired paterns as .gitignore with either direct string +matches or wildcard globs
git config --global core.excludesfile [file]system wide ignore patern for all local repositories
+

INSPECT & COMPARE

+

Examining logs, diffs and object information

+ + + + + + + + + + + + + + + + + + + + + +
git logshow the commit history for the currently active branch
git log branchB..branchAshow the commits on branchA that are not on branchB
git log --follow [file]show the commits that changed file, even across renames
git diff branchB...branchAshow the diff of what is in branchA that is not in branchB
git show [SHA]show any object in Git in human-readable format
+ From fead94dbb01ba56026830ddcbf3d331aca888400 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:29:13 +0000 Subject: [PATCH 33/78] Update gittable.md --- gittable.md | 57 +++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/gittable.md b/gittable.md index 5d55d2b..fb36f6a 100644 --- a/gittable.md +++ b/gittable.md @@ -4,6 +4,34 @@

GIT CHEAT SHEET

+

SETUP

+

Configuring user information used across all local repositories

+ + + + + + + + + + + + + +
git config --global user.name “[firstname lastname]”set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”set an email address that will be associated with each history marker
git config --global color.ui autoset automatic command line coloring for Git for easy reviewing
+

SETUP & INIT

+

Configuring user information, initializing and cloning repositories

+ + + + + + + + + +
git initinitialize an existing directory as a Git repository
git clone [url]retrieve an entire repository from a hosted location via URL

STAGE & SNAPSHOT

Working with snapshots and the Git staging area

@@ -32,34 +60,7 @@
commit your staged content as a new commit snapshot
-

SETUP

-

Configuring user information used across all local repositories

- - - - - - - - - - - - - -
git config --global user.name “[firstname lastname]”set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”set an email address that will be associated with each history marker
git config --global color.ui autoset automatic command line coloring for Git for easy reviewing
-

SETUP & INIT

-

Configuring user information, initializing and cloning repositories

- - - - - - - - - -
git initinitialize an existing directory as a Git repository
git clone [url]retrieve an entire repository from a hosted location via URL
+

BRANCH & MERGE

Isolating work in branches, changing context, and integrating changes

From 3cff6524d794990428b9b97d2646632d64b29271 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:46:12 +0000 Subject: [PATCH 34/78] Update gittable.md --- gittable.md | 103 ++++++++++++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/gittable.md b/gittable.md index fb36f6a..043d3f8 100644 --- a/gittable.md +++ b/gittable.md @@ -85,28 +85,28 @@
show all commits in the current branch’s history
-

SHARE & UPDATE

-

Retrieving updates from another repository and updating local repos

+

INSPECT & COMPARE

+

Examining logs, diffs and object information

- - + + - - + + - - + + - - + + - - + +
git remote add [alias] [url]add a git URL as an aliasgit logshow the commit history for the currently active branch
git fetch [alias]fetch down all the branches from that Git remotegit log branchB..branchAshow the commits on branchA that are not on branchB
git merge [alias]/[branch]merge a remote branch into your current branch to bring it up to dategit log --follow [file]show the commits that changed file, even across renames
git push [alias] [branch]Transmit local branch commits to the remote repository branchgit diff branchB...branchAshow the diff of what is in branchA that is not in branchB
git pullfetch and merge any commits from the tracking remote branchgit show [SHA]show any object in Git in human-readable format

TRACKING PATH CHANGES

@@ -125,24 +125,43 @@ show all commit logs with indication of any paths that moved -

TEMPORARY COMMITS

-

Temporarily store modified, tracked files in order to change branches

+

IGNORING PATTERNS

+

Preventing unintentional staging or commiting of files

- - + + - - + + +
git stashSave modified and staged changeslogs/ +*.notes +pattern*/Save a file with desired paterns as .gitignore with either direct string +matches or wildcard globs
git stash listlist stack-order of stashed file changesgit config --global core.excludesfile [file]system wide ignore patern for all local repositories
+

SHARE & UPDATE

+

Retrieving updates from another repository and updating local repos

+ - - + + - - + + + + + + + + + + + + + +
git stash popwrite working from top of stash stackgit remote add [alias] [url]add a git URL as an alias
git stash dropdiscard the changes from top of stash stackgit fetch [alias]fetch down all the branches from that Git remote
git merge [alias]/[branch]merge a remote branch into your current branch to bring it up to date
git push [alias] [branch]Transmit local branch commits to the remote repository branch
git pullfetch and merge any commits from the tracking remote branch

REWRITE HISTORY

@@ -157,43 +176,25 @@ clear staging area, rewrite working tree from specified commit -

IGNORING PATTERNS

-

Preventing unintentional staging or commiting of files

- - - - - - - - - -
logs/ -*.notes -pattern*/Save a file with desired paterns as .gitignore with either direct string -matches or wildcard globs
git config --global core.excludesfile [file]system wide ignore patern for all local repositories
-

INSPECT & COMPARE

-

Examining logs, diffs and object information

+

TEMPORARY COMMITS

+

Temporarily store modified, tracked files in order to change branches

- - - - - - + + - - + + - - + + - - + +
git logshow the commit history for the currently active branch
git log branchB..branchAshow the commits on branchA that are not on branchBgit stashSave modified and staged changes
git log --follow [file]show the commits that changed file, even across renamesgit stash listlist stack-order of stashed file changes
git diff branchB...branchAshow the diff of what is in branchA that is not in branchBgit stash popwrite working from top of stash stack
git show [SHA]show any object in Git in human-readable formatgit stash dropdiscard the changes from top of stash stack
+ From d37a568332c94db9f591f20e5fb28519f856ab11 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:47:46 +0000 Subject: [PATCH 35/78] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fc94d36..409b82b 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` ## Linux Commands - +- **printing working directory** + - To print the path of the working directory, starting from the root + ``` + pwd + ``` - **Creating a New Directory** - To create a new directory, run the following command: ``` From 1ca885a222bfeb74e3ebff4bca47461291e66a18 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:54:22 +0000 Subject: [PATCH 36/78] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 409b82b..ba6ccd0 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,14 @@ This README file contains important Linux and GitHub commands that you should kn ``` cd directoryname ``` - + - To change the current directory to parent directory, run the following command: + ``` + cd .. + ``` + - To change the current directory to root directory, run the following command: + ``` + cd . + ``` - **Listing the Contents of a Directory** - To list the contents of a directory, run the following command: ``` From d5133a63f65abe1c61f4969151c8bc8834775a6e Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:02:58 +0000 Subject: [PATCH 37/78] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ba6ccd0..6e85c09 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ This README file contains important Linux and GitHub commands that you should kn - **Open a file using VSCode** - To open a file using VSCode simply write: ``` - code filename + code [filename] ``` ## Linux Commands @@ -137,13 +137,13 @@ This README file contains important Linux and GitHub commands that you should kn - **Creating a New Directory** - To create a new directory, run the following command: ``` - mkdir directoryname + mkdir [directoryname] ``` - **Changing the Current Directory** - To change the current directory, run the following command: ``` - cd directoryname + cd [directoryname] ``` - To change the current directory to parent directory, run the following command: ``` @@ -162,31 +162,31 @@ This README file contains important Linux and GitHub commands that you should kn - **Creating a New File** - To create a new file, run the following command: ``` - touch filename + touch [filename] ``` - **editing the file** - To open and edit a file, run the following command: ``` - vi filename + vi [filename] ``` -- **opening a File in VSCode** - - To open a file inside VSCode, run the following command: +- **Disk uusage** + - To analyze and report on disk usage within directories and files. ``` - code filename + du [directory/file] ``` - **Viewing the Contents of a File** - To view the contents of a file, run the following command: ``` - cat filename + cat [filename] ``` - **Deleting a File or Directory** - To delete a file or directory, run the following command: ``` - rm -rf filename + rm -rf [filename] ``` - **Generate a new SSH key pair** From 640547aad329d1a1d04ce38a03ab558789626ef3 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:06:03 +0000 Subject: [PATCH 38/78] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e85c09..55228ac 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,11 @@ This README file contains important Linux and GitHub commands that you should kn ``` rm -rf [filename] ``` - +- **history of executed command** + - To view previously executed commands: + ``` + history + ``` - **Generate a new SSH key pair** - This following command will generate a new SSH key pair. It creates a RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. ```bash From ff3e086c33bec072430b71e2fd2c03376a483b68 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:15:06 +0000 Subject: [PATCH 39/78] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 55228ac..7d7956d 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,12 @@ This README file contains important Linux and GitHub commands that you should kn ``` cat [filename] ``` - +- **copy file** + - To copy a file, run the following command: + ``` + cp [Source_file] [Destination_file] + ``` + - **Deleting a File or Directory** - To delete a file or directory, run the following command: ``` From 3e57303bc8a7107121a2948550c66b36957c5557 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:24:50 +0000 Subject: [PATCH 40/78] Update README.md --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d7956d..f11de3b 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ This README file contains important Linux and GitHub commands that you should kn ``` - **Disk uusage** - - To analyze and report on disk usage within directories and files. + - To analyze and report on disk usage within directories and files, execute the following command: ``` du [directory/file] ``` @@ -193,11 +193,32 @@ This README file contains important Linux and GitHub commands that you should kn ``` rm -rf [filename] ``` + - **history of executed command** - - To view previously executed commands: + - To view previously executed this command: ``` history - ``` + ``` + +- **view date and time** + - To view current date and time executed this command: + ``` + date + ``` +- **view calender** + - To view specific month in a year executed this command: + ``` + cal [month][year] + ``` + - To view current month in a year executed this command: + ``` + cal + ``` + - To view full year executed this command: + ``` + cal -y + ``` + - **Generate a new SSH key pair** - This following command will generate a new SSH key pair. It creates a RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. ```bash From d6602e0a6a61b9d18596f76961c6b5fb76dacea0 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:12:59 +0000 Subject: [PATCH 41/78] Update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f11de3b..46f9ee1 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,15 @@ This README file contains important Linux and GitHub commands that you should kn - **Adding a File to the Repository** - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: ``` - git add filename + git add "filename" + ``` +- **Removing a File from the Repository** + - To remove a file from the repository, first make sure the file is in the correct directory. Then, run the following command: + ``` + git rm --cached "filename" ``` - - **Commiting Changes** - - After adding the file, you can commit the changes to the repository with the following command: + - After adding/removing the file, you can commit the changes to the repository with the following command: ``` git commit -m "commit message" ``` From 80703f3748f27affbda7d2f5ee1644592c4915ab Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 11:30:58 +0100 Subject: [PATCH 42/78] editing and adding anaconda --- README.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 46f9ee1..1c33d4a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This README file contains important Linux and GitHub commands that you should kn - [GitHub](#github) - [Git](#git) - [VSCode](#VSCode) +- [Anaconda](#) - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) @@ -131,28 +132,90 @@ This README file contains important Linux and GitHub commands that you should kn ``` code [filename] ``` - +## Anaconda +command: +- **Installing Anaconda** + + To install Anaconda, follow these steps: + + Download the Anaconda installer for your operating system from the [official Anaconda distribution page](https://www.anaconda.com/products/distribution). + Run the installer and follow the on-screen instructions. +- **Create a new environment** + + To create a new environment, run the following command: + ```bash + conda create --name myenv + ``` + Replace myenv with the name you want to give to your environment. +- **Activate an environment** + + To activate an environment, run the following command: + ```bash + conda activate myenv + ``` +- **Install packages in the environment** + + A YAML environment file is a text file that specifies the packages and dependencies for an environment. To use a YAML environment file, create a file named environment.yml with the following content: + ```bash + name: myenv + dependencies: + - anaconda + - python=3.8 + - pip + - pip: + - package1 + - package2 + ``` + Replace myenv with the name of your environment, and package1 and package2 with the names of the packages you want to install. +- **create an environment using the YAML file** + + To create an environment from the YAML file, run the following: + ```bash + conda env create -f environment.yml + ``` +- **Updating an Environment** + + To update an environment from the YAML file, run: + ```bash + conda env update -f environment.yml + ``` + To update an environment, run: + ```bash + conda update --all --name myenv + ``` + Replace myenv with the name of your environment. +- **Viewing a List of Your Environments** + + To view a list of all your environments, run: + ```bash + conda env list + ``` +This will display a list of all your environments, along with their names and paths. + ## Linux Commands - **printing working directory** - - To print the path of the working directory, starting from the root - ``` + + To print the path of the working directory, starting from the root + ```bash pwd ``` - **Creating a New Directory** - - To create a new directory, run the following command: - ``` + + To create a new directory, run the following command: + ```bash mkdir [directoryname] ``` - **Changing the Current Directory** - - To change the current directory, run the following command: - ``` + + To change the current directory, run the following command: + ```bash cd [directoryname] ``` - - To change the current directory to parent directory, run the following command: - ``` + To change the current directory to parent directory, run the following command: + ```bash cd .. - ``` + ``` - To change the current directory to root directory, run the following command: ``` cd . From 9e4336048a71d73ad3a7e2034b6dd5e395be9aa9 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 12:00:23 +0100 Subject: [PATCH 43/78] updated added the cheatsheet --- README.md | 518 ++++++++++++++++++++++++++++++++++++---------------- gittable.md | 200 -------------------- 2 files changed, 359 insertions(+), 359 deletions(-) diff --git a/README.md b/README.md index 1c33d4a..ecad6c2 100644 --- a/README.md +++ b/README.md @@ -4,136 +4,339 @@ This README file contains important Linux and GitHub commands that you should kn ## Table of Contents -- [GitHub](#github) -- [Git](#git) +- [Git & GitHub](#git--github) +- [Git Usage](#git-usage) - [VSCode](#VSCode) - [Anaconda](#) - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) -## GitHub - +## Git & GitHub + + + + + +

GIT CHEAT SHEET

+

SETUP

+

Configuring user information used across all local repositories

+ + + + + + + + + + + + + +
git config --global user.name “[firstname lastname]”set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”set an email address that will be associated with each history marker
git config --global color.ui autoset automatic command line coloring for Git for easy reviewing
+

SETUP & INIT

+

Configuring user information, initializing and cloning repositories

+ + + + + + + + + +
git initinitialize an existing directory as a Git repository
git clone [url]retrieve an entire repository from a hosted location via URL
+

STAGE & SNAPSHOT

+

Working with snapshots and the Git staging area

+ + + + + + + + + + + + + + + + + + + + + + + + + +
git statusshow modified files in working directory, staged for your next commit
git add [file]add a file as it looks now to your next commit (stage)
git reset [file]unstage a file while retaining the changes in working directory
git diffdiff of what is changed but not staged
git diff --stageddiff of what is staged but not yet commited
git commit -m “[descriptive message]”commit your staged content as a new commit snapshot
+ +

BRANCH & MERGE

+

Isolating work in branches, changing context, and integrating changes

+ + + + + + + + + + + + + + + + + + + + + +
git branchlist your branches. a * will appear next to the currently active branch
git branch [branch-name]create a new branch at the current commit
git checkoutswitch to another branch and check it out into your working directory
git merge [branch]merge the specified branch’s history into the current one
git logshow all commits in the current branch’s history
+

INSPECT & COMPARE

+

Examining logs, diffs and object information

+ + + + + + + + + + + + + + + + + + + + + +
git logshow the commit history for the currently active branch
git log branchB..branchAshow the commits on branchA that are not on branchB
git log --follow [file]show the commits that changed file, even across renames
git diff branchB...branchAshow the diff of what is in branchA that is not in branchB
git show [SHA]show any object in Git in human-readable format
+

TRACKING PATH CHANGES

+

Versioning file removes and path changes

+ + + + + + + + + + + + + +
git rm [file]delete the file from project and stage the removal for commit
git mv [existing-path] [new-path]change an existing file path and stage the move
git log --stat -Mshow all commit logs with indication of any paths that moved
+

IGNORING PATTERNS

+

Preventing unintentional staging or commiting of files

+ + + + + + + + + +
logs/ +*.notes +pattern*/Save a file with desired paterns as .gitignore with either direct string +matches or wildcard globs
git config --global core.excludesfile [file]system wide ignore patern for all local repositories
+

SHARE & UPDATE

+

Retrieving updates from another repository and updating local repos

+ + + + + + + + + + + + + + + + + + + + + +
git remote add [alias] [url]add a git URL as an alias
git fetch [alias]fetch down all the branches from that Git remote
git merge [alias]/[branch]merge a remote branch into your current branch to bring it up to date
git push [alias] [branch]Transmit local branch commits to the remote repository branch
git pullfetch and merge any commits from the tracking remote branch
+

REWRITE HISTORY

+

Rewriting branches, updating commits and clearing history

+ + + + + + + + + +
git rebase [branch]apply any commits of current branch ahead of specified one
git reset --hard [commit]clear staging area, rewrite working tree from specified commit
+

TEMPORARY COMMITS

+

Temporarily store modified, tracked files in order to change branches

+ + + + + + + + + + + + + + + + + +
git stashSave modified and staged changes
git stash listlist stack-order of stashed file changes
git stash popwrite working from top of stash stack
git stash dropdiscard the changes from top of stash stack
+ +## **Git Usage**: - **Creating a Repository** - - To create a new repository on GitHub, go to your profile page and click on the green "New" button. + + To create a new repository on GitHub, go to your profile page and click on the green "New" button. - **set Git configuration** - - To set up github on the local git, open your terminal or command prompt and run the following commands: - ``` - git config --global user.name “-------” - git config --global user.email “------” - ``` + + To set up github on the local git, open your terminal or command prompt and run the following commands: + ```bash + git config --global user.name “-------” + git config --global user.email “------” + ``` - **set Git configuration** - - To check your github configuration on the local git, run the following commands: - ``` - git config --list - ``` + + To check your github configuration on the local git, run the following commands: + ```bash + git config --list + ``` - **Cloning a Repository** - - To clone a repository, open your terminal or command prompt and run the following command: - ``` - git clone git@github.com:username/repository.git - ``` - + To clone a repository, open your terminal or command prompt and run the following command: + ```bash + git clone git@github.com:username/repository.git + ``` - **connect to a remote repository on GitHub** - - Run this git command to connect your local Git repository to a remote repository on GitHub. + + Run this git command to connect your local Git repository to a remote repository on GitHub. ```bash - git remote add origin git@github.com:username/repositoryname.git + git remote add origin git@github.com:username/repositoryname.git ``` - **Adding a File to the Repository** - - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: - ``` - git add "filename" - ``` + + To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: + ```bash + git add "filename" + ``` - **Removing a File from the Repository** - - To remove a file from the repository, first make sure the file is in the correct directory. Then, run the following command: - ``` - git rm --cached "filename" - ``` -- **Commiting Changes** - - After adding/removing the file, you can commit the changes to the repository with the following command: - ``` - git commit -m "commit message" - ``` + To remove a file from the repository, first make sure the file is in the correct directory. Then, run the following command: + ```bash + git rm --cached "filename" + ``` +- **Commiting Changes** + + After adding/removing the file, you can commit the changes to the repository with the following command: + ```bash + git commit -m "commit message" + ``` - **Pushing Changes to GitHub** - - To push the changes to the GitHub repository, run the following command: - ``` - git push origin master - ``` - + + To push the changes to the GitHub repository, run the following command: + ```bash + git push origin master + ``` - **Update your repo to the latest changes** - - If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. - ``` - git pull origin main - ``` - ``` - git pull git@github.com:username/repository.git master - ``` - -## Git + If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. + ```bash + git pull origin main + ``` + ```bash + git pull git@github.com:username/repository.git master + ``` - **Initializing a new repository** - - To create a new repository - ``` - git init - ``` - + + To create a new repository + ```bash + git init + ``` - **Creating a New Branch** - - To create a new branch, run the following command: - ``` - git checkout -b branchname - ``` + + To create a new branch, run the following command: + ```bash + git checkout -b branchname + ``` - **Switching Between Branches** - - To switch between branches, run the following command: - ``` - git checkout branchname - ``` - + + To switch between branches, run the following command: + ``` + git checkout branchname + ``` - **current status of your working directory** - - This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. - ``` - git status - ``` - + + This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. + ``` + git status + ``` - **Merging Branches** - - To merge a branch into the master branch, first switch to the master branch and then run the following command: - ``` - git merge branchname - ``` - ``` - git merge branchname --no-edit -m "commit message" - ``` - + + To merge a branch into the master branch, first switch to the master branch and then run the following command: + ``` + git merge branchname + ``` + ``` + git merge branchname --no-edit -m "commit message" + ``` - **Deleting a Branch** - - To delete a branch, run the following command: - ``` - git branch -d branchname - ``` - + + To delete a branch, run the following command: + ``` + git branch -d branchname + ``` - **view the commit history** - - This will display a list of all the commits made to the repository, including the author, date, and commit message. - ``` - git log - ``` - + + This will display a list of all the commits made to the repository, including the author, date, and commit message. + ``` + git log + ``` ## VSCode - **Open VSCode using terminal** - - To open VSCode simply write: - ``` - code - ``` - + + To open VSCode simply write: + ```bash + code + ``` - **Open a file using VSCode** - - To open a file using VSCode simply write: - ``` - code [filename] - ``` + + To open a file using VSCode simply write: + ``` + code [filename] + ``` ## Anaconda -command: - **Installing Anaconda** To install Anaconda, follow these steps: @@ -171,26 +374,26 @@ command: To create an environment from the YAML file, run the following: ```bash - conda env create -f environment.yml + conda env create -f environment.yml ``` - **Updating an Environment** To update an environment from the YAML file, run: ```bash - conda env update -f environment.yml + conda env update -f environment.yml ``` To update an environment, run: ```bash - conda update --all --name myenv + conda update --all --name myenv ``` Replace myenv with the name of your environment. - **Viewing a List of Your Environments** To view a list of all your environments, run: ```bash - conda env list + conda env list ``` -This will display a list of all your environments, along with their names and paths. + This will display a list of all your environments, along with their names and paths. ## Linux Commands - **printing working directory** @@ -202,58 +405,57 @@ This will display a list of all your environments, along with their names and pa - **Creating a New Directory** To create a new directory, run the following command: - ```bash - mkdir [directoryname] - ``` + ```bash + mkdir [directoryname] + ``` - **Changing the Current Directory** To change the current directory, run the following command: - ```bash - cd [directoryname] - ``` + ```bash + cd [directoryname] + ``` To change the current directory to parent directory, run the following command: ```bash - cd .. + cd .. + ``` + To change the current directory to root directory, run the following command: + ```bash + cd . ``` - - To change the current directory to root directory, run the following command: - ``` - cd . - ``` - **Listing the Contents of a Directory** - - To list the contents of a directory, run the following command: - ``` - ls - ``` - + + To list the contents of a directory, run the following command: + ``` + ls + ``` - **Creating a New File** - - To create a new file, run the following command: - ``` - touch [filename] - ``` - + + To create a new file, run the following command: + ```bash + touch [filename] + ``` - **editing the file** - - To open and edit a file, run the following command: - ``` - vi [filename] - ``` - + + To open and edit a file, run the following command: + ``` + vi [filename] + ``` - **Disk uusage** - - To analyze and report on disk usage within directories and files, execute the following command: - ``` - du [directory/file] - ``` - + To analyze and report on disk usage within directories and files, execute the following command: + ``` + du [directory/file] + ``` - **Viewing the Contents of a File** - - To view the contents of a file, run the following command: - ``` - cat [filename] - ``` + To view the contents of a file, run the following command: + ``` + cat [filename] + ``` - **copy file** - - To copy a file, run the following command: - ``` - cp [Source_file] [Destination_file] - ``` + To copy a file, run the following command: + ``` + cp [Source_file] [Destination_file] + ``` - **Deleting a File or Directory** - To delete a file or directory, run the following command: @@ -360,27 +562,25 @@ This will display a list of all your environments, along with their names and pa ``` - Save your script file. - - Open a terminal and navigate to the directory where your script file is located. - - - Give the script file execute permissions by running the following command: - - ```bash - chmod +x my_script.sh - ``` - - Now you can run your script by executing the following command: + Open a terminal and navigate to the directory where your script file is located. Give the script file execute permissions by running the following command: - ```bash - ./my_script.sh - ``` - - This will execute your script and display the output in your terminal. + ```bash + chmod +x my_script.sh + ``` + Now you can run your script by executing the following command: - - Remember to replace my_script.sh with the actual name of your script file. - - EXAMPLE: ```bash - #!/user/bin/bash - greeting = "welcome" - user = $(whoami) - day = $(date + %A) - echo "greeting back $user! Today is $day, which is the best day of the entire week!" - echo "your bash shell version is $BASH_VERSION. Enjoy!" + ./my_script.sh ``` + This will execute your script and display the output in your terminal. + + Remember to replace my_script.sh with the actual name of your script file. + - EXAMPLE: + ```bash + #!/user/bin/bash + greeting = "welcome" + user = $(whoami) + day = $(date + %A) + echo "greeting back $user! Today is $day, which is the best day of the entire week!" + echo "your bash shell version is $BASH_VERSION. Enjoy!" + ``` diff --git a/gittable.md b/gittable.md index 043d3f8..e69de29 100644 --- a/gittable.md +++ b/gittable.md @@ -1,200 +0,0 @@ - - - GITHUB - - -

GIT CHEAT SHEET

-

SETUP

-

Configuring user information used across all local repositories

- - - - - - - - - - - - - -
git config --global user.name “[firstname lastname]”set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”set an email address that will be associated with each history marker
git config --global color.ui autoset automatic command line coloring for Git for easy reviewing
-

SETUP & INIT

-

Configuring user information, initializing and cloning repositories

- - - - - - - - - -
git initinitialize an existing directory as a Git repository
git clone [url]retrieve an entire repository from a hosted location via URL
-

STAGE & SNAPSHOT

-

Working with snapshots and the Git staging area

- - - - - - - - - - - - - - - - - - - - - - - - - -
git statusshow modified files in working directory, staged for your next commit
git add [file]add a file as it looks now to your next commit (stage)
git reset [file]unstage a file while retaining the changes in working directory
git diffdiff of what is changed but not staged
git diff --stageddiff of what is staged but not yet commited
git commit -m “[descriptive message]”commit your staged content as a new commit snapshot
- -

BRANCH & MERGE

-

Isolating work in branches, changing context, and integrating changes

- - - - - - - - - - - - - - - - - - - - - -
git branchlist your branches. a * will appear next to the currently active branch
git branch [branch-name]create a new branch at the current commit
git checkoutswitch to another branch and check it out into your working directory
git merge [branch]merge the specified branch’s history into the current one
git logshow all commits in the current branch’s history
-

INSPECT & COMPARE

-

Examining logs, diffs and object information

- - - - - - - - - - - - - - - - - - - - - -
git logshow the commit history for the currently active branch
git log branchB..branchAshow the commits on branchA that are not on branchB
git log --follow [file]show the commits that changed file, even across renames
git diff branchB...branchAshow the diff of what is in branchA that is not in branchB
git show [SHA]show any object in Git in human-readable format
-

TRACKING PATH CHANGES

-

Versioning file removes and path changes

- - - - - - - - - - - - - -
git rm [file]delete the file from project and stage the removal for commit
git mv [existing-path] [new-path]change an existing file path and stage the move
git log --stat -Mshow all commit logs with indication of any paths that moved
-

IGNORING PATTERNS

-

Preventing unintentional staging or commiting of files

- - - - - - - - - -
logs/ -*.notes -pattern*/Save a file with desired paterns as .gitignore with either direct string -matches or wildcard globs
git config --global core.excludesfile [file]system wide ignore patern for all local repositories
-

SHARE & UPDATE

-

Retrieving updates from another repository and updating local repos

- - - - - - - - - - - - - - - - - - - - - -
git remote add [alias] [url]add a git URL as an alias
git fetch [alias]fetch down all the branches from that Git remote
git merge [alias]/[branch]merge a remote branch into your current branch to bring it up to date
git push [alias] [branch]Transmit local branch commits to the remote repository branch
git pullfetch and merge any commits from the tracking remote branch
-

REWRITE HISTORY

-

Rewriting branches, updating commits and clearing history

- - - - - - - - - -
git rebase [branch]apply any commits of current branch ahead of specified one
git reset --hard [commit]clear staging area, rewrite working tree from specified commit
-

TEMPORARY COMMITS

-

Temporarily store modified, tracked files in order to change branches

- - - - - - - - - - - - - - - - - -
git stashSave modified and staged changes
git stash listlist stack-order of stashed file changes
git stash popwrite working from top of stash stack
git stash dropdiscard the changes from top of stash stack
- - From 687e715a06eb458731058489be3dc96ae177f442 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 12:01:27 +0100 Subject: [PATCH 44/78] Delete gittable.md --- gittable.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 gittable.md diff --git a/gittable.md b/gittable.md deleted file mode 100644 index e69de29..0000000 From 7929495c66e990f942f859f3f988e01ecbe4b927 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 12:56:58 +0100 Subject: [PATCH 45/78] added and fixed issues --- README.md | 362 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 186 insertions(+), 176 deletions(-) diff --git a/README.md b/README.md index ecad6c2..657e303 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This README file contains important Linux and GitHub commands that you should kn - [Git & GitHub](#git--github) - [Git Usage](#git-usage) - [VSCode](#VSCode) -- [Anaconda](#) +- [Anaconda](#anaconda) - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) @@ -217,125 +217,124 @@ matches or wildcard globs To create a new repository on GitHub, go to your profile page and click on the green "New" button. - **set Git configuration** - - To set up github on the local git, open your terminal or command prompt and run the following commands: - ```bash - git config --global user.name “-------” - git config --global user.email “------” - ``` + To set up github on the local git, open your terminal or command prompt and run the following commands: + ```bash + git config --global user.name “-------” + git config --global user.email “------” + ``` - **set Git configuration** - To check your github configuration on the local git, run the following commands: - ```bash - git config --list - ``` + To check your github configuration on the local git, run the following commands: + ```bash + git config --list + ``` - **Cloning a Repository** - To clone a repository, open your terminal or command prompt and run the following command: - ```bash - git clone git@github.com:username/repository.git - ``` + + To clone a repository, open your terminal or command prompt and run the following command: + ```bash + git clone git@github.com:username/repository.git + ``` - **connect to a remote repository on GitHub** - - Run this git command to connect your local Git repository to a remote repository on GitHub. - ```bash - git remote add origin git@github.com:username/repositoryname.git - ``` - + + Run this git command to connect your local Git repository to a remote repository on GitHub. + ```bash + git remote add origin git@github.com:username/repositoryname.git + ``` - **Adding a File to the Repository** - To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: - ```bash - git add "filename" - ``` + To add a file to the repository, first make sure the file is in the correct directory. Then, open your terminal or command prompt and navigate to the directory where the file is located. Finally, run the following command: + ```bash + git add "filename" + ``` - **Removing a File from the Repository** - To remove a file from the repository, first make sure the file is in the correct directory. Then, run the following command: - ```bash - git rm --cached "filename" - ``` + To remove a file from the repository, first make sure the file is in the correct directory. Then, run the following command: + ```bash + git rm --cached "filename" + ``` - **Commiting Changes** - - After adding/removing the file, you can commit the changes to the repository with the following command: - ```bash - git commit -m "commit message" - ``` + + After adding/removing the file, you can commit the changes to the repository with the following command: + ```bash + git commit -m "commit message" + ``` - **Pushing Changes to GitHub** - - To push the changes to the GitHub repository, run the following command: - ```bash - git push origin master - ``` + + To push the changes to the GitHub repository, run the following command: + ```bash + git push origin master + ``` - **Update your repo to the latest changes** - If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. - ```bash - git pull origin main - ``` - ```bash - git pull git@github.com:username/repository.git master - ``` + If you already have a local copy of the repository and you want to update it, you can use the git pull command. This command fetches changes from the remote repository and merges them into your local branch. + ```bash + git pull origin main + ``` + ```bash + git pull git@github.com:username/repository.git master + ``` - **Initializing a new repository** - To create a new repository - ```bash - git init - ``` + To create a new repository + ```bash + git init + ``` - **Creating a New Branch** - To create a new branch, run the following command: - ```bash - git checkout -b branchname - ``` + To create a new branch, run the following command: + ```bash + git checkout -b branchname + ``` - **Switching Between Branches** - To switch between branches, run the following command: - ``` - git checkout branchname - ``` + To switch between branches, run the following command: + ```bash + git checkout branchname + ``` - **current status of your working directory** - - This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. - ``` - git status - ``` + + This command shows you which files have been modified, staged, or deleted and the brach you are currently on. Additionally, it will show you any conflicts that may have arisen during a merge or rebase. + ```bash + git status + ``` - **Merging Branches** - - To merge a branch into the master branch, first switch to the master branch and then run the following command: - ``` - git merge branchname - ``` - ``` - git merge branchname --no-edit -m "commit message" - ``` + + To merge a branch into the master branch, first switch to the master branch and then run the following command: + ```bash + git merge branchname + ``` + ```bash + git merge branchname --no-edit -m "commit message" + ``` - **Deleting a Branch** - - To delete a branch, run the following command: - ``` - git branch -d branchname - ``` + + To delete a branch, run the following command: + ```bash + git branch -d branchname + ``` - **view the commit history** - - This will display a list of all the commits made to the repository, including the author, date, and commit message. - ``` - git log - ``` + + This will display a list of all the commits made to the repository, including the author, date, and commit message. + ```bash + git log + ``` ## VSCode - **Open VSCode using terminal** - - To open VSCode simply write: - ```bash - code - ``` + + To open VSCode simply write: + ```bash + code + ``` - **Open a file using VSCode** - To open a file using VSCode simply write: - ``` - code [filename] - ``` + To open a file using VSCode simply write: + ```bash + code [filename] + ``` ## Anaconda - **Installing Anaconda** @@ -447,120 +446,131 @@ matches or wildcard globs du [directory/file] ``` - **Viewing the Contents of a File** - To view the contents of a file, run the following command: - ``` - cat [filename] - ``` + + To view the contents of a file, run the following command: + ``` + cat [filename] + ``` - **copy file** - To copy a file, run the following command: - ``` - cp [Source_file] [Destination_file] - ``` - + + To copy a file, run the following command: + ``` + cp [Source_file] [Destination_file] + ``` - **Deleting a File or Directory** - - To delete a file or directory, run the following command: - ``` - rm -rf [filename] - ``` - + + To delete a file or directory, run the following command: + ```bash + rm -rf [filename] + ``` - **history of executed command** - - To view previously executed this command: + + To view previously executed this command: ``` history ``` - **view date and time** - - To view current date and time executed this command: + + To view current date and time executed this command: ``` date ``` - **view calender** - - To view specific month in a year executed this command: - ``` - cal [month][year] - ``` - - To view current month in a year executed this command: - ``` - cal - ``` - - To view full year executed this command: - ``` - cal -y - ``` - + + To view specific month in a year executed this command: + ``` + cal [month][year] + ``` + To view current month in a year executed this command: + ``` + cal + ``` + To view full year executed this command: + ```bash + cal -y + ``` - **Generate a new SSH key pair** - - This following command will generate a new SSH key pair. It creates a RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. - ```bash - ssh-keygen -t rsa - ``` - ```bash - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - ``` - - This command will generate a new SSH key pair. It creates a 4096-bit RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. The -C flag is used to add a comment, which is useful for identification purposes. - + + This following command will generate a new SSH key pair. It creates a RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. + ```bash + ssh-keygen -t rsa + ``` + ```bash + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + ``` + This command will generate a new SSH key pair. It creates a 4096-bit RSA key pair and saves the private key to a file named "id_rsa" in the "~/.ssh" directory, and it saves the public key to a file named "id_rsa.pub" in the same directory. The -C flag is used to add a comment, which is useful for identification purposes. - **Searching for a File or Directory** - - To search for a file or directory, run the following command: - ``` - find / -name "filename" 2>/dev/null - ``` + + To search for a file or directory, run the following command: + ``` + find / -name "filename" 2>/dev/null + ``` - **Downloading a File** - - To download a file, run the following command: - ``` - wget fileurl - ``` + + To download a file, run the following command: + ``` + wget fileurl + ``` - **Extracting a Zip File** - - To extract a zip file, run the following command: - ``` - unzip filename.zip - ``` + + To extract a zip file, run the following command: + ``` + unzip filename.zip + ``` - **Compressing a Directory** - - To compress a directory into a zip file, run the following command: - ``` - zip -r filename.zip directoryname - ``` + + To compress a directory into a zip file, run the following command: + ``` + zip -r filename.zip directoryname + ``` - **Moving a File or Directory** - - To move a file or directory, run the following command: - ``` - mv filename destination - ``` + + To move a file or directory, run the following command: + ``` + mv filename destination + ``` - **Renaming a File or Directory** - - To rename a file or directory, run the following command: - ``` - mv oldfilename newfilename - ``` + + To rename a file or directory, run the following command: + ``` + mv oldfilename newfilename + ``` - **Updating the System** - - To update the system, run the following command: - ``` - sudo apt-get update && sudo apt-get upgrade - ``` + + To update the system, run the following command: + ``` + sudo apt-get update && sudo apt-get upgrade + ``` - **Checking the System's Uptime** - - To check the system's uptime, run the following command: - ``` - uptime - ``` - + + To check the system's uptime, run the following command: + ``` + uptime + ``` ## Bash Files -- **To create a bash script file with the .sh extension. For example, my_script.sh.** - - Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. - ```bash - #!/user/bin/bash - ``` - - Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. - ```bash - #!/user/bin/bash - - echo "Hello, World!" - - ls - ``` - - Save your script file. +- **Creating a Bash File** + + To create a bash script file with the .sh extension. For example, "my_script.sh" Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. + ```bash + #!/user/bin/bash + ``` + Write your script commands under the shebang line. Each command should be on a new line. For example, let's print "Hello, World!" and list the files in the current directory. + ```bash + #!/user/bin/bash + + echo "Hello, World!" + + ls + ``` + Save your script file. Open a terminal and navigate to the directory where your script file is located. Give the script file execute permissions by running the following command: @@ -583,4 +593,4 @@ matches or wildcard globs day = $(date + %A) echo "greeting back $user! Today is $day, which is the best day of the entire week!" echo "your bash shell version is $BASH_VERSION. Enjoy!" - ``` + ``` \ No newline at end of file From c903b42cbb5cec675bbaccea140653e7b5639dac Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 13:03:35 +0100 Subject: [PATCH 46/78] added and fixed issues --- README.md | 186 +++++++++++++++++++++++++++--------------------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/README.md b/README.md index 657e303..593f0c5 100644 --- a/README.md +++ b/README.md @@ -337,28 +337,28 @@ matches or wildcard globs ``` ## Anaconda - **Installing Anaconda** - - To install Anaconda, follow these steps: - - Download the Anaconda installer for your operating system from the [official Anaconda distribution page](https://www.anaconda.com/products/distribution). - Run the installer and follow the on-screen instructions. + + To install Anaconda, follow these steps: + + Download the Anaconda installer for your operating system from the [official Anaconda distribution page](https://www.anaconda.com/products/distribution). + Run the installer and follow the on-screen instructions. - **Create a new environment** - To create a new environment, run the following command: - ```bash - conda create --name myenv - ``` - Replace myenv with the name you want to give to your environment. + To create a new environment, run the following command: + ```bash + conda create --name myenv + ``` + Replace myenv with the name you want to give to your environment. - **Activate an environment** - To activate an environment, run the following command: - ```bash - conda activate myenv - ``` + To activate an environment, run the following command: + ```bash + conda activate myenv + ``` - **Install packages in the environment** - A YAML environment file is a text file that specifies the packages and dependencies for an environment. To use a YAML environment file, create a file named environment.yml with the following content: - ```bash + A YAML environment file is a text file that specifies the packages and dependencies for an environment. To use a YAML environment file, create a file named environment.yml with the following content: + ```bash name: myenv dependencies: - anaconda @@ -367,86 +367,87 @@ matches or wildcard globs - pip: - package1 - package2 - ``` - Replace myenv with the name of your environment, and package1 and package2 with the names of the packages you want to install. + ``` + Replace myenv with the name of your environment, and package1 and package2 with the names of the packages you want to install. - **create an environment using the YAML file** - To create an environment from the YAML file, run the following: - ```bash - conda env create -f environment.yml - ``` + To create an environment from the YAML file, run the following: + ```bash + conda env create -f environment.yml + ``` - **Updating an Environment** - - To update an environment from the YAML file, run: - ```bash - conda env update -f environment.yml - ``` - To update an environment, run: - ```bash - conda update --all --name myenv - ``` - Replace myenv with the name of your environment. + + To update an environment from the YAML file, run: + ```bash + conda env update -f environment.yml + ``` + To update an environment, run: + ```bash + conda update --all --name myenv + ``` + Replace myenv with the name of your environment. - **Viewing a List of Your Environments** - - To view a list of all your environments, run: - ```bash - conda env list - ``` - This will display a list of all your environments, along with their names and paths. + + To view a list of all your environments, run: + ```bash + conda env list + ``` + This will display a list of all your environments, along with their names and paths. ## Linux Commands - **printing working directory** - To print the path of the working directory, starting from the root - ```bash - pwd - ``` + To print the path of the working directory, starting from the root + ```bash + pwd + ``` - **Creating a New Directory** - - To create a new directory, run the following command: - ```bash - mkdir [directoryname] - ``` + + To create a new directory, run the following command: + ```bash + mkdir [directoryname] + ``` - **Changing the Current Directory** - - To change the current directory, run the following command: - ```bash - cd [directoryname] - ``` - To change the current directory to parent directory, run the following command: - ```bash - cd .. - ``` - To change the current directory to root directory, run the following command: - ```bash - cd . - ``` + + To change the current directory, run the following command: + ```bash + cd [directoryname] + ``` + To change the current directory to parent directory, run the following command: + ```bash + cd .. + ``` + To change the current directory to root directory, run the following command: + ```bash + cd . + ``` - **Listing the Contents of a Directory** - - To list the contents of a directory, run the following command: - ``` - ls - ``` + + To list the contents of a directory, run the following command: + ``` + ls + ``` - **Creating a New File** - To create a new file, run the following command: - ```bash - touch [filename] - ``` + To create a new file, run the following command: + ```bash + touch [filename] + ``` - **editing the file** - To open and edit a file, run the following command: - ``` - vi [filename] - ``` + To open and edit a file, run the following command: + ``` + vi [filename] + ``` - **Disk uusage** - To analyze and report on disk usage within directories and files, execute the following command: - ``` - du [directory/file] - ``` + + To analyze and report on disk usage within directories and files, execute the following command: + ``` + du [directory/file] + ``` - **Viewing the Contents of a File** - + To view the contents of a file, run the following command: ``` cat [filename] @@ -464,14 +465,13 @@ matches or wildcard globs rm -rf [filename] ``` - **history of executed command** - + To view previously executed this command: ``` history ``` - - **view date and time** - + To view current date and time executed this command: ``` date @@ -572,20 +572,20 @@ matches or wildcard globs ``` Save your script file. - Open a terminal and navigate to the directory where your script file is located. Give the script file execute permissions by running the following command: + Open a terminal and navigate to the directory where your script file is located. Give the script file execute permissions by running the following command: - ```bash - chmod +x my_script.sh - ``` - Now you can run your script by executing the following command: + ```bash + chmod +x my_script.sh + ``` + Now you can run your script by executing the following command: - ```bash - ./my_script.sh - ``` - This will execute your script and display the output in your terminal. + ```bash + ./my_script.sh + ``` + This will execute your script and display the output in your terminal. - Remember to replace my_script.sh with the actual name of your script file. - - EXAMPLE: + Remember to replace my_script.sh with the actual name of your script file. + - EXAMPLE: ```bash #!/user/bin/bash greeting = "welcome" @@ -593,4 +593,4 @@ matches or wildcard globs day = $(date + %A) echo "greeting back $user! Today is $day, which is the best day of the entire week!" echo "your bash shell version is $BASH_VERSION. Enjoy!" - ``` \ No newline at end of file + ``` From 510f1852d641cd26a4dcb699b0ba866539afe368 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:15:17 +0100 Subject: [PATCH 47/78] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 593f0c5..53e381a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# README.md - -This README file contains important Linux and GitHub commands that you should know. +Thisvrepository named Terminal_Commands, which contains a comprehensive collection of terminal commands and instructions for various tasks related to Git, GitHub, VSCode, Anaconda, and Linux commands. ## Table of Contents From b695be9ca7fffc82638ee0ea4df70540487f94a2 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:17:38 +0100 Subject: [PATCH 48/78] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 53e381a..6f578f8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti

GIT CHEAT SHEET

-

SETUP

+

SETUP

Configuring user information used across all local repositories

@@ -32,7 +32,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
set automatic command line coloring for Git for easy reviewing
-

SETUP & INIT

+

SETUP & INIT

Configuring user information, initializing and cloning repositories

@@ -44,7 +44,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
retrieve an entire repository from a hosted location via URL
-

STAGE & SNAPSHOT

+

STAGE & SNAPSHOT

Working with snapshots and the Git staging area

@@ -73,7 +73,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
-

BRANCH & MERGE

+

BRANCH & MERGE

Isolating work in branches, changing context, and integrating changes

@@ -97,7 +97,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
show all commits in the current branch’s history
-

INSPECT & COMPARE

+

INSPECT & COMPARE

Examining logs, diffs and object information

From 5797aa3abb633f292cfeb93c5314a646c8889c0c Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:18:27 +0100 Subject: [PATCH 49/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f578f8..3853a06 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti -

GIT CHEAT SHEET

+

GIT CHEAT SHEET

SETUP

Configuring user information used across all local repositories

From de161126ee87c7961363f16d7c1893ae3a988c39 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:22:13 +0100 Subject: [PATCH 50/78] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3853a06..227228d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti ## Table of Contents - [Git & GitHub](#git--github) -- [Git Usage](#git-usage) + +[]() + + [Git Usage](#git-usage) - [VSCode](#VSCode) - [Anaconda](#anaconda) - [Linux Commands](#linux-commands) @@ -121,7 +122,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
show any object in Git in human-readable format
-

TRACKING PATH CHANGES

+

TRACKING PATH CHANGES

Versioning file removes and path changes

@@ -152,7 +153,7 @@ matches or wildcard globs
system wide ignore patern for all local repositories
-

SHARE & UPDATE

+

SHARE & UPDATE

Retrieving updates from another repository and updating local repos

@@ -188,7 +189,7 @@ matches or wildcard globs
clear staging area, rewrite working tree from specified commit
-

TEMPORARY COMMITS

+

TEMPORARY COMMITS

Temporarily store modified, tracked files in order to change branches

From e1d8fe740cc9bff2c81a138e2376b4d9ed5f4d30 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:24:49 +0100 Subject: [PATCH 51/78] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 227228d..2ca2605 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,8 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) -## Git & GitHub - + Git & GitHub @@ -209,8 +208,7 @@ matches or wildcard globs
discard the changes from top of stash stack
- -## **Git Usage**: +

Git Usage:

- **Creating a Repository** To create a new repository on GitHub, go to your profile page and click on the green "New" button. From ee9ffbfe4852c3373a9a1454ee2bf9e81885ce9f Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:30:14 +0100 Subject: [PATCH 52/78] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ca2605..bb80fd1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti ## Table of Contents - [Git & GitHub](#git--github) - +[]() + + [Git cheat sheet](#Git-cheat-sheet) + [Git Usage](#git-usage) - [VSCode](#VSCode) - [Anaconda](#anaconda) @@ -15,7 +15,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti -

GIT CHEAT SHEET

+

Git cheat sheet

SETUP

Configuring user information used across all local repositories

From 7d906e2b54f63cb747095c0728073cdef16427f7 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:31:20 +0100 Subject: [PATCH 53/78] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bb80fd1..4461d9d 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ matches or wildcard globs

Git Usage:

+ - **Creating a Repository** To create a new repository on GitHub, go to your profile page and click on the green "New" button. From ccc5066409c7fcbf334ddfceaed70d72cd342461 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:39:27 +0100 Subject: [PATCH 54/78] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 4461d9d..3688b30 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ + + .88888888:. + 88888888.88888. + .8888888888888888. + 888888888888888888 + 88' _`88'_ `88888 + 88 88 88 88 88888 + 88_88_::_88_:88888 + 88:::,::,:::::8888 + 88`:::::::::'`8888 + .88 `::::' 8:88. + 8888 `8:888. + .8888' `888888. + .8888:.. .::. ...:'8888888:. + .8888.' :' `'::`88:88888 + .8888 ' `.888:8888. + 888:8 . 888:88888 + .888:88 .: 888:88888: + 8888888. :: 88:888888 + `.::.888. :: .88888888 + .::::::.888. :: :::`8888'.:. + ::::::::::.888 ' .:::::::::::: _ _ + ::::::::::::.8 ' .:8::::::::::::. | (_) + .::::::::::::::. .:888::::::::::::: | |_ _ __ _ ___ __ + :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / + `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < +miK `':::_:' -- '' -'-' `':_::::'` |_|_|_| |_|\__,_/_/\_\ + + + Thisvrepository named Terminal_Commands, which contains a comprehensive collection of terminal commands and instructions for various tasks related to Git, GitHub, VSCode, Anaconda, and Linux commands. ## Table of Contents From 2b1254d3559ca3ca829caa175679cdf8247f4d99 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:39:51 +0100 Subject: [PATCH 55/78] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3688b30..7568d02 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +``` ASCII .88888888:. 88888888.88888. .8888888888888888. @@ -25,6 +25,7 @@ :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < miK `':::_:' -- '' -'-' `':_::::'` |_|_|_| |_|\__,_/_/\_\ +``` From 504fe8bb4f9e558a98e518e2cfcda7042dbdfcab Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 13:46:48 +0100 Subject: [PATCH 56/78] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7568d02..186adac 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -``` ASCII +``` bash .88888888:. 88888888.88888. .8888888888888888. @@ -19,12 +19,12 @@ 8888888. :: 88:888888 `.::.888. :: .88888888 .::::::.888. :: :::`8888'.:. - ::::::::::.888 ' .:::::::::::: _ _ - ::::::::::::.8 ' .:8::::::::::::. | (_) - .::::::::::::::. .:888::::::::::::: | |_ _ __ _ ___ __ - :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / - `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < -miK `':::_:' -- '' -'-' `':_::::'` |_|_|_| |_|\__,_/_/\_\ + ::::::::::.888 ' .:::::::::::: _ _ _ _ _ + ::::::::::::.8 ' .:8::::::::::::. | (_) | | (_) | | + .::::::::::::::. .:888::::::::::::: | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | + :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | + `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | +miK `':::_:' -- '' -'-' `':_::::'` |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From 71574fe27ca1cdaba96d314d989f470d2bcb4824 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:10:43 +0100 Subject: [PATCH 57/78] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 186adac..96aa793 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ``` bash - .88888888:. + '.88888888:. 88888888.88888. .8888888888888888. 888888888888888888 @@ -21,10 +21,10 @@ .::::::.888. :: :::`8888'.:. ::::::::::.888 ' .:::::::::::: _ _ _ _ _ ::::::::::::.8 ' .:8::::::::::::. | (_) | | (_) | | - .::::::::::::::. .:888::::::::::::: | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | + .:::mehdi::::::. .:888::::::::::::: | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | -miK `':::_:' -- '' -'-' `':_::::'` |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| + `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From 0b90543ee92202efa8789a212d90bbf497443f09 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:11:34 +0100 Subject: [PATCH 58/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96aa793..682af24 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ 88888888.88888. .8888888888888888. 888888888888888888 - 88' _`88'_ `88888 + 88` _`88`_ `88888 88 88 88 88 88888 88_88_::_88_:88888 88:::,::,:::::8888 From bbdffec92f8c577e3be08cbb569b6312846b463e Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:13:41 +0100 Subject: [PATCH 59/78] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 682af24..8fc5df9 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,12 @@ 8888888. :: 88:888888 `.::.888. :: .88888888 .::::::.888. :: :::`8888'.:. - ::::::::::.888 ' .:::::::::::: _ _ _ _ _ - ::::::::::::.8 ' .:8::::::::::::. | (_) | | (_) | | - .:::mehdi::::::. .:888::::::::::::: | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | - :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | + ::::::::::.888 ' .::::::::::::' _ _ _ _ _ + ::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | + .:::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | + :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | - `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| + `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From 19d3acdb2cac9943687d62d89c1d3db7e91f00a8 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:14:51 +0100 Subject: [PATCH 60/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fc5df9..1ce32d9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ .::::::.888. :: :::`8888'.:. ::::::::::.888 ' .::::::::::::' _ _ _ _ _ ::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | - .:::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | + ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| From d5ca66a6a9f97a158b98ecead154db4ef6cd9c9d Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:17:47 +0100 Subject: [PATCH 61/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ce32d9..137fc28 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ 8888 `8:888. .8888' `888888. .8888:.. .::. ...:'8888888:. - .8888.' :' `'::`88:88888 + .8888.' :' `'::`88:88888' .8888 ' `.888:8888. 888:8 . 888:88888 .888:88 .: 888:88888: From d8daefd4dd3841025ab55eb1e33cbe4bdf0030e0 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:20:42 +0100 Subject: [PATCH 62/78] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 137fc28..3cbbee0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 88_88_::_88_:88888 88:::,::,:::::8888 88`:::::::::'`8888 - .88 `::::' 8:88. + .88 '::::' '8:88. 8888 `8:888. .8888' `888888. .8888:.. .::. ...:'8888888:. @@ -22,7 +22,7 @@ ::::::::::.888 ' .::::::::::::' _ _ _ _ _ ::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | - :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | + :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From a5c361fb88f9275c437253bc4f19a31fade16d8a Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:22:34 +0100 Subject: [PATCH 63/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cbbee0..bc5dedb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ 88`:::::::::'`8888 .88 '::::' '8:88. 8888 `8:888. - .8888' `888888. + .8888' 888888. .8888:.. .::. ...:'8888888:. .8888.' :' `'::`88:88888' .8888 ' `.888:8888. From ac800d5f54ff33e0bcab51631ae44ec045bdfdc4 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:24:17 +0100 Subject: [PATCH 64/78] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc5dedb..69ba0fc 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,15 @@ 8888 `8:888. .8888' 888888. .8888:.. .::. ...:'8888888:. - .8888.' :' `'::`88:88888' + .8888.' :' `':: 88:88888' .8888 ' `.888:8888. 888:8 . 888:88888 .888:88 .: 888:88888: 8888888. :: 88:888888 `.::.888. :: .88888888 .::::::.888. :: :::`8888'.:. - ::::::::::.888 ' .::::::::::::' _ _ _ _ _ - ::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | + '::::::::::.888 ' .::::::::::::' _ _ _ _ _ + '::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | From 9b064d0b6e2448abcc2ca5a3450e67f035a8495b Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 14:25:29 +0100 Subject: [PATCH 65/78] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 69ba0fc..e2e0b2d 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ 8888 `8:888. .8888' 888888. .8888:.. .::. ...:'8888888:. - .8888.' :' `':: 88:88888' + .8888.' :' `':: 88:88888 .8888 ' `.888:8888. 888:8 . 888:88888 .888:88 .: 888:88888: 8888888. :: 88:888888 - `.::.888. :: .88888888 - .::::::.888. :: :::`8888'.:. + .::.888. :: .88888888 + .::::::.888. :: ::: 8888 .:. '::::::::::.888 ' .::::::::::::' _ _ _ _ _ '::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | From 624a9a93ec7740ed106bfea144493295d1eab026 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:12:27 +0100 Subject: [PATCH 66/78] Update README.md --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2e0b2d..9decdd1 100644 --- a/README.md +++ b/README.md @@ -454,7 +454,7 @@ matches or wildcard globs - **Listing the Contents of a Directory** To list the contents of a directory, run the following command: - ``` + ```bash ls ``` - **Creating a New File** @@ -466,19 +466,19 @@ matches or wildcard globs - **editing the file** To open and edit a file, run the following command: - ``` + ```bash vi [filename] ``` - **Disk uusage** To analyze and report on disk usage within directories and files, execute the following command: - ``` + ```bash du [directory/file] ``` - **Viewing the Contents of a File** To view the contents of a file, run the following command: - ``` + ```bash cat [filename] ``` - **copy file** @@ -486,13 +486,17 @@ matches or wildcard globs To copy a file, run the following command: ``` cp [Source_file] [Destination_file] + ```bash + To copy a folder, run the following command: + ```bash + cp -r [Source_folder] [Destination_file] ``` - **Deleting a File or Directory** To delete a file or directory, run the following command: ```bash rm -rf [filename] - ``` + ``` - **history of executed command** To view previously executed this command: From 1f42b9bc67a07baa772cef999716527cdad3e35e Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:40:09 +0100 Subject: [PATCH 67/78] Update README.md --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9decdd1..87bb4ed 100644 --- a/README.md +++ b/README.md @@ -457,6 +457,14 @@ matches or wildcard globs ```bash ls ``` + To list the contents of a directory in a long listing format, run the following command: + ```bash + ls -l + ``` + To list the contents including hidden content of a directory, run the following command: + ```bash + ls -a + ``` - **Creating a New File** To create a new file, run the following command: @@ -493,10 +501,18 @@ matches or wildcard globs ``` - **Deleting a File or Directory** - To delete a file or directory, run the following command: + To delete a file, run the following command: ```bash rm -rf [filename] - ``` + ``` + To delete a folder, run the following command: + ```bash + rm -r [foldername] + ``` + To delete a directory, run the following command: + ```bash + rm dir [filename] + ``` - **history of executed command** To view previously executed this command: @@ -551,7 +567,7 @@ matches or wildcard globs To extract a zip file, run the following command: ``` - unzip filename.zip + unzip [filename.zip] ``` - **Compressing a Directory** @@ -565,14 +581,14 @@ matches or wildcard globs To move a file or directory, run the following command: ``` - mv filename destination + mv [filename] [destination] ``` - **Renaming a File or Directory** To rename a file or directory, run the following command: ``` - mv oldfilename newfilename + mv [oldfilename] [newfilename] ``` - **Updating the System** From b4b1ab9721aff1eb6e61f55f46cd548644c5c2e8 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:50:57 +0100 Subject: [PATCH 68/78] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 87bb4ed..a894fe9 100644 --- a/README.md +++ b/README.md @@ -477,6 +477,7 @@ matches or wildcard globs ```bash vi [filename] ``` + After this press "i" to be able to insert and then press "ESC" to exit inser mode and press "q" to quit and "wq" to write the file and quit. - **Disk uusage** To analyze and report on disk usage within directories and files, execute the following command: @@ -625,6 +626,20 @@ matches or wildcard globs ```bash chmod +x my_script.sh + + chmod u+rwx my_script.sh + . + . + . + ``` + removing permission + ```bash + chmod u-w my_script.sh + + chmod u-r my_script.sh + . + . + . ``` Now you can run your script by executing the following command: @@ -643,3 +658,5 @@ matches or wildcard globs echo "greeting back $user! Today is $day, which is the best day of the entire week!" echo "your bash shell version is $BASH_VERSION. Enjoy!" ``` +## REF +[ss64.com](ss64.com) From 51cef87e99f12f13e68dfab0db3ca47dbd38e97e Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:53:14 +0100 Subject: [PATCH 69/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a894fe9..2f9ee75 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ 8888888. :: 88:888888 .::.888. :: .88888888 .::::::.888. :: ::: 8888 .:. - '::::::::::.888 ' .::::::::::::' _ _ _ _ _ + '::::::::::.888 ' .::::::::::::' '_ _ _ _ _ '::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | From 06b8960bf8ae0455ef424c88a0678abc578a2700 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:54:04 +0100 Subject: [PATCH 70/78] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f9ee75..7698a04 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ 8888888. :: 88:888888 .::.888. :: .88888888 .::::::.888. :: ::: 8888 .:. - '::::::::::.888 ' .::::::::::::' '_ _ _ _ _ - '::::::::::::.8 ' .:8::::::::::::.' | (_) | | (_) | | + '::::::::::.888 ' .::::::::::::'' _ _ _ _ _ + '::::::::::::.8 ' .:8::::::::::::'' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | From bc742e20aa0a5d1b9fe403cf1eedb758bc1e6bed Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 17:55:57 +0100 Subject: [PATCH 71/78] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7698a04..e1cf892 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ 8888888. :: 88:888888 .::.888. :: .88888888 .::::::.888. :: ::: 8888 .:. - '::::::::::.888 ' .::::::::::::'' _ _ _ _ _ - '::::::::::::.8 ' .:8::::::::::::'' | (_) | | (_) | | + '::::::::::.888 ' .::::::::::::' _ _ _ _ _ + '::::::::::::.8 ' .:8::::::::::::' | (_) | | (_) | | ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | - :::::::::::::::88:.__..:88888:::::::::::' | | | '_ \| | | \ \/ / | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | | + :::::::::::::::88:.__..:88888:::::::::::' | | | `_ \| | | \ \/ / | __/ _ \ `__| `_ ` _ \| | `_ \ / _` | | `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From 3f23c2a33d9b910c289e1fcb51a93bf59aad8d08 Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 18:12:49 +0100 Subject: [PATCH 72/78] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e1cf892..551adc4 100644 --- a/README.md +++ b/README.md @@ -34,19 +34,19 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti ## Table of Contents - [Git & GitHub](#git--github) - + [Git cheat sheet](#Git-cheat-sheet) + + [Git cheat sheet]() + [Git Usage](#git-usage) - [VSCode](#VSCode) -- [Anaconda](#anaconda) +- [Anaconda]() - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) - Git & GitHub +

Git & GitHub

-

Git cheat sheet

+

Git cheat sheet

SETUP

Configuring user information used across all local repositories

@@ -168,7 +168,7 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti
show all commit logs with indication of any paths that moved
-

IGNORING PATTERNS

+

IGNORING PATTERNS

Preventing unintentional staging or commiting of files

@@ -207,7 +207,7 @@ matches or wildcard globs
fetch and merge any commits from the tracking remote branch
-

REWRITE HISTORY

+

REWRITE HISTORY

Rewriting branches, updating commits and clearing history

@@ -239,7 +239,7 @@ matches or wildcard globs
discard the changes from top of stash stack
-

Git Usage:

+

Git Usage:

- **Creating a Repository** From 8d78d0f1279e865911a08ad4b5a73329786ca16f Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 18:30:26 +0100 Subject: [PATCH 73/78] Update README.md --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 551adc4..ceb06d5 100644 --- a/README.md +++ b/README.md @@ -34,20 +34,18 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti ## Table of Contents - [Git & GitHub](#git--github) - + [Git cheat sheet]() + + [Git cheat sheet](Git-cheat-sheet) + [Git Usage](#git-usage) - [VSCode](#VSCode) -- [Anaconda]() +- [Anaconda](#Anaconda) - [Linux Commands](#linux-commands) - [Bash Files](#Bash-Files) +## Git & GitHub +### Git cheat sheet: - -

Git & GitHub

- -

Git cheat sheet

-

SETUP

+

SETUP

Configuring user information used across all local repositories

@@ -239,7 +237,7 @@ matches or wildcard globs
discard the changes from top of stash stack
-

Git Usage:

+### Git Usage: - **Creating a Repository** @@ -350,7 +348,7 @@ matches or wildcard globs ```bash git log ``` -## VSCode +### VSCode - **Open VSCode using terminal** @@ -364,7 +362,7 @@ matches or wildcard globs ```bash code [filename] ``` -## Anaconda +### Anaconda - **Installing Anaconda** To install Anaconda, follow these steps: @@ -423,7 +421,7 @@ matches or wildcard globs ``` This will display a list of all your environments, along with their names and paths. -## Linux Commands +### Linux Commands - **printing working directory** To print the path of the working directory, starting from the root @@ -605,7 +603,7 @@ matches or wildcard globs ``` uptime ``` -## Bash Files +### Bash Files - **Creating a Bash File** To create a bash script file with the .sh extension. For example, "my_script.sh" Add a shebang line at the beginning of the script to specify the interpreter. In this case, we will use bash. @@ -659,4 +657,4 @@ matches or wildcard globs echo "your bash shell version is $BASH_VERSION. Enjoy!" ``` ## REF -[ss64.com](ss64.com) + + [ss64.com](https://ss64.com/) From d7fc1ab285b611af31ef6477b624800c5e8a9ea8 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 18:40:45 +0100 Subject: [PATCH 74/78] fixed issues --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ceb06d5..cfdbf5e 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,13 @@ Thisvrepository named Terminal_Commands, which contains a comprehensive collecti ## Table of Contents - [Git & GitHub](#git--github) - + [Git cheat sheet](Git-cheat-sheet) + + [Git cheat sheet](#git-cheat-sheet) + [Git Usage](#git-usage) -- [VSCode](#VSCode) -- [Anaconda](#Anaconda) +- [VSCode](#vscode) +- [Anaconda](#anaconda) - [Linux Commands](#linux-commands) -- [Bash Files](#Bash-Files) +- [Bash Files](#bash-files) +- [References](#references) ## Git & GitHub ### Git cheat sheet: @@ -237,6 +238,7 @@ matches or wildcard globs discard the changes from top of stash stack + ### Git Usage: - **Creating a Repository** @@ -656,5 +658,5 @@ matches or wildcard globs echo "greeting back $user! Today is $day, which is the best day of the entire week!" echo "your bash shell version is $BASH_VERSION. Enjoy!" ``` -## REF +## References + [ss64.com](https://ss64.com/) From 4f4d00fdd9cf6de24beca85f2301507d7e40e30c Mon Sep 17 00:00:00 2001 From: Mehdi Almousavi <149006566+Mehdialmoo@users.noreply.github.com> Date: Sat, 25 May 2024 18:49:17 +0100 Subject: [PATCH 75/78] Update README.md --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cfdbf5e..406baab 100644 --- a/README.md +++ b/README.md @@ -11,20 +11,20 @@ .88 '::::' '8:88. 8888 `8:888. .8888' 888888. - .8888:.. .::. ...:'8888888:. - .8888.' :' `':: 88:88888 - .8888 ' `.888:8888. - 888:8 . 888:88888 - .888:88 .: 888:88888: - 8888888. :: 88:888888 - .::.888. :: .88888888 - .::::::.888. :: ::: 8888 .:. - '::::::::::.888 ' .::::::::::::' _ _ _ _ _ - '::::::::::::.8 ' .:8::::::::::::' | (_) | | (_) | | - ':::mehdi::::::. .:888:::::::::::::' | |_ _ __ _ ___ __ | |_ ___ _ __ _ __ ___ _ _ __ __ _| | - :::::::::::::::88:.__..:88888:::::::::::' | | | `_ \| | | \ \/ / | __/ _ \ `__| `_ ` _ \| | `_ \ / _` | | - `'.:::::::::::88888888888.88:::::::::' | | | | | | |_| |> < | || __/ | | | | | | | | | | | (_| | | - `':::_:' -- '' -'-' `':_::::'`' |_|_|_| |_|\__,_/_/\_\ \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| + .8888:.. .::. ...:'8888888:. _ _ + .8888.' :' `':: 88:88888 | (_) + .8888 ' `.888:8888. | |_ _ __ _ ___ __ + 888:8 . 888:88888 | | | `_ \| | | \ \/ / + .888:88 .: 888:88888: | | | | | | |_| |> < + 8888888. :: 88:888888 |_|_|_| |_|\__,_/_/\_\ + .::.888. :: .88888888 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ + .::::::.888. :: ::: 8888 .:. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ + '::::::::::.888 ' .::::::::::::' _ _ _ + '::::::::::::.8 ' .:8::::::::::::' | | (_) | | + ':::mehdi::::::. .:888:::::::::::::' | |_ ___ _ __ _ __ ___ _ _ __ __ _| | + :::::::::::::::88:.__..:88888:::::::::::' | __/ _ \ `__| `_ ` _ \| | `_ \ / _` | | + `'.:::::::::::88888888888.88:::::::::' | || __/ | | | | | | | | | | | (_| | | + `':::_:' -- '' -'-' `':_::::'`' \__\___|_| |_| |_| |_|_|_| |_|\__,_|_| ``` From 6e04a2dbc6bf66552ee70a11f58acce0c730aa45 Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 18:51:39 +0100 Subject: [PATCH 76/78] fixed issues --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 406baab..03be0c3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -``` bash +```python '.88888888:. 88888888.88888. .8888888888888888. From e227900f3a44c345ab0d33320ce63a15bfe61e2f Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 18:53:39 +0100 Subject: [PATCH 77/78] fixed issues --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03be0c3..d3c97d6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -```python +```bash '.88888888:. 88888888.88888. .8888888888888888. From 7dd1ba8eca108e9f485fc4f706e97f100ccef83b Mon Sep 17 00:00:00 2001 From: mehdialmoo Date: Sat, 25 May 2024 19:22:40 +0100 Subject: [PATCH 78/78] fixed issues --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d3c97d6..dde7b57 100644 --- a/README.md +++ b/README.md @@ -526,6 +526,8 @@ matches or wildcard globs ``` date ``` + To view a date manualy use: + - **view calender** To view specific month in a year executed this command: