Skip to main content

git remove files from being tracked

How do you remove a file from git?

Use the command (rm) to remove files from your local git repository

git rm --cached

It's important to note the --cached flag deletes the file from your git repository, it becomes an untracked file in your project folder.  For the change(s) to kick in, you need to commit the changes.

How to move your Git repo to another location

Moving a Git repo due to a change of agencies

 

Steps to change the repo:

1. Create a temporary directory

Create a temporary directory obviously where your other sites are located locally.  For me, this is in the Sites directory.

mkdir temp-dir

 

2. Clone

Begin by cloning the current repo in the directory generated above

What the following git commands do...

git reset, git revert, and git cherry-pick are three Git commands used for different purposes related to managing your version control history. Here's a brief overview of each command:

git reset
git revert
git cherry-pick

 

Subscribe to 1.x