Git – File Operations – POFTUT

Git – File Operations

Normal file operations like deleting, moving, changing file name can be done in git.

Removing File

A tracked file can be removed liked below.

  • rm removes file

After remove operation and commit the file will be not tracked and exist for the future commits but exist in the history.

If the file is edited we need to force removal with the following command.

  • rm removes the specified file
  • -f forces for removal even if the file is edited

Moving Files

Unlike other vcs Git do not tracks files movements for reguler movement. To make  Git aware of the movement mv is used.

  • mv moves to
LEARN MORE  Linux fsck Command Tutorial With Examples

Leave a Reply

Your email address will not be published. Required fields are marked *