⌨️
Web Design
  • Index
  • Front End
    • Front End Index
  • HTML/CSS/JS
    • HTML Index
      • Page layout
      • Form
      • Image Optimization
    • CSS Index
      • CSS Selectors
        • Selectors
        • Combinators
        • Attribute Selectors
        • Pseudo classes
      • CSS Cascade and Inheritance
        • Cascade
        • Inheritance
      • Specificity
      • Box Model
      • CSS Clearfix
      • Responsive Meta Tag
      • Flexbox Layout
      • Grid Layout
      • CSS Naming Rules
        • Golden Guidelines for Writing Clean CSS
        • BEM
        • Rules
      • Frameworks & Libraries
    • JS Index
      • JS loading
      • Modules
      • Js Array Common Method 1
      • Js Array Common Method 2
      • Custom attributes on the element
      • Operator
      • Parse a JSON Date in JavaScript
      • Importmap
  • Git
    • Git Index
    • Initialize a Repository
    • Top 20 Git Commands With Examples
  • UML
    • UML Class
  • React
    • Index
      • setState async issue
      • Redux
      • Axios
      • useState update in A Timeout
  • WebGL
    • WebGL Index
  • Back End
    • Back-End Index
      • Knex
      • Bookshelf
        • bookshelf install
        • Bookshelf only returns one row
      • Server side init flow
      • Install Wordpress on Ubuntu 22.04 with a LAMP Stack
  • React Native
    • React Native Index
      • Dynamically changing Image URLs in React Native
  • Expo
    • EAS build config
Powered by GitBook
On this page
  • Bash Commands
  • Initializing a repository
  • Checking the status of the repository

Was this helpful?

  1. Git

Initialize a Repository

Bash Commands

Bash is a command-line interface (CLI) used on UNIX style systems (Mac and Linux).

If you're using a Mac, these commands can be used in the standard Terminal. The standard Windows Command Prompt uses different commands.

Fortunately for Windows users, installing Git also installs Git Bash, a UNIX style CLI. This means we can use Bash commands on Windows!

The following list offers a concise overview of the essential Bash navigation commands.

Command

Description

pwd

Current directory filepath

ls

List all files in current directory

cd

Change directory (ex. cd DirectoryName)

cd ..

Change to parent directory

Initializing a repository

When we are ready to start our project, we move to the project folder using the command line. Then type git init to initialize an empty Git repository on your computer.

# Move to project folder
cd my_project

# Initialize repository
git init

Checking the status of the repository

To get a list of the repository's current status, which will include untracked, modified, and staged files, we would use the git status command from within the project folder.

# Check the status of the repository
git status
PreviousGit IndexNextTop 20 Git Commands With Examples

Last updated 4 years ago

Was this helpful?