Initialize a Repository
Last updated
Last updated
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.
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.
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.
Command
Description
pwd
Current directory filepath
ls
List all files in current directory
cd
Change directory (ex. cd DirectoryName
)
cd ..
Change to parent directory