Skip to content

kanitmann/Basic_Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Basic Commands


Basic Commands for Bash, Linux, CMD, and GIT

  1. Bash
  2. CMD
  3. Linux
  4. GIT
  • For Bash

    • List command:
     ls
    • Change Directory:
    cd 'directory_name'
    • Clear Page:
    clear
    • Make Directory:
    mkdir 'directory_name'
    • Remove Directory:
    rmdir 'directory_name'
    • Edit a File:
    nano 'filename'.extension
    • Create a File:
    touch 'filename'.extension
    • Remove a File:
    rm 'filename'.extension



  • For CMD:

    • Change Directory:
    cd "filename".extension
    • List All Directories:
    dir

    Make Directory (folder):

    mkdir 'directory_name'
    • Remove Directory:
    rmdir 'filename'
    • Delete file:
    del 'filename'.extension
    • Shows manual help:
    help



  • For Linux:

    • Change directory:
    cd 'directory_name'
    • List all directory:
    ls
    • Make Directory:
    mkdir 'directory_name'
    • Delete file/dir (-f) [here, (-f) means force]:
    rm
    • Displays the current Directory:
    pwd
    • Shows Manual Help:
    man



  • GIT commands:

    • clone a Repository:
    git clone <URL>
    • Initializing a GIT Repository:
     git init
    • Getting staging status:
    git status
    • Show git log:
    git log
    • Add Files to Staging Area:
    git add .
    • Commit changes:
    git commit -m " "
    • Change Working Branch:
    git checkout 'branch_name'
    • Push Command:
     git push <remote name> <branch name>
    • Force Push Command:
    git push <remote name> <branch name> --force
    • Creating new Branch:
    git switch -c <new-branch-name>

    or

    git branch <new-branch-name>
    • Pull latest commit from remote:
     git pull <remote> <branch>
    • View all branches:
    git branch
    • Delete Branch:
    git branch -d <branch-name>
    • Merge Repository:
    git merge <repo name>
    • Compare Difference Between 2 commits
     git diff <commit_1 id> <commit_2 id>

    For any issues or suggestions, please Contact Me

About

Basic Terminal Commands for Bash, CMD, and GIT

Topics

Resources

License

Stars

Watchers

Forks