Git

Last Updated: 7/13/2023

Staging Files

Create file

echo hello > file1.txt
  • echo is standard Unix or Linux command for writing content to a file

Check Status

git status

Add files to Staging area

  • Git is not going to automatically track your files, you have to instruct Git to track them

Add single file

git add file1.txt

Add multiple files

git add file1.txt file2.txt

Add patterns

git add *.txt

Add entire directory

  • Adds the entire directory recursively.
git add .