2

I have already published a project on the heroku now I want to update my individual page with individual commit.

when I try by this way:

git fetch
git checkout -m <revision> <yourfilepath>
git add <yourfilepath>
git commit

But, when I go on the git checkout -m <revision> <filepath> then my updated value or data has deleted.

I had did like this: git checkout -m master .\client\src\pages\About.js

I have followed from here but still can't solved my problem

I don't know how to solve this problem.

Anyone find my mistake!

Alamin
  • 1,878
  • 1
  • 14
  • 34

1 Answers1

1

With Git 2.23+, I would advice to use instead git restore, which only deals with files.
Example, to get just one file, and add it to the index, in one command:

 git restore --source <revision> --staged --worktree -- <yourfilepath>
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250