14763/git-remove-committed-file-after-push
Is there a possibility to revert a committed file in Git? I've pushed a commit to GitHub and then I realized that there's a file which I didn't want to be pushed
check out the previous (unchanged) state of your file; notice the double dash
git checkout HEAD^ -- /path/to/file
commit it:
git commit -am "revert changes on this file, not finished with it yet"
push it, no force needed:
git push
get back to your unfinished work, again do (3 times arrow up):
Where can we find the PHP website, ...READ MORE
Hi@Shashi, You can use the git clean command. ...READ MORE
This is simple, just follow the below ...READ MORE
This is simple, just follow the commands ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
The error is due to the fact ...READ MORE
You also can use git filter-branch for that. git filter-branch ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.