简体   繁体   中英

How to update individual page in github project?

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!

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM