0

I have two file changes in a git commit. I have sent a pull request and still it is not merged. I need to know the command of removing one file change from the pull request. I mean not to delete the file from the repository. But to to remove new local changes from my commit. Please advice me.Thanks

Hasanthi
  • 1,251
  • 3
  • 14
  • 30
  • Does this work: git checkout origin/master -- path/to/file ?? – Mindastic Jul 08 '15 at 03:06
  • did you already commit the changes? If you did, you'll have to [`revert`](http://stackoverflow.com/questions/215718/reset-or-revert-a-specific-file-to-a-specific-revision-using-git) them. – NightShadeQueen Jul 08 '15 at 03:08

2 Answers2

0

I believe you have to do this:

git reset --soft HEAD^ 
Fuad
  • 1,419
  • 1
  • 16
  • 31
0

You can use

git reset --soft HEAD~1

and then reset the unwanted file

git reset HEAD /path_to_the_file

and you can commit again.

abhilashv
  • 1,418
  • 1
  • 13
  • 18