Basic Workflow

  1. Status

Command will display the untracked files from the repository. These files can be added to our repository.

git status
  1. Add File

The git add command is used to add file contents to the Index (Staging Area).

git add
Ex: git add filename
git add . or git add *
git add test.txt
  1. Commit

It is used to record the changes in the repository. It is the next command after the git add.

git commit
git commit -m “msg”
Ex: git commit -m “First file”
  1. Remove File

git rm

git rm is used to remove a file from a Git repository.

git rm test.txt 
git rm -r test.txt

Last updated