git revert only part of commit
Use the --no-commit (-n) option to git revert, then unstage the changes, then use git add --patch:
$ git revert -n $bad_commit # Revert the commit, but don't commit the changes
$ git reset HEAD . # Unstage the changes
$ git add --patch . # Add whatever changes you want
$ git commit # Commit those changes
Note: The files you add using git add --patch are the files you want to revert, not the files you want to keep.
Also in C++:
- gitignore for ue4
- how to install pip
- switching git branch in gitbash
- see what is using a port ubuntu
- install admin lte in laravel
- suid privilege escalation systemctl
- git revert file to master
- Illuminate\Http\Exceptions\PostTooLargeException Ubuntu
- ubuntu sites available location?
- deletes lines including regex match
- mac install homebrew
- how to install mongoose globally
- git asking for password every time
- rpi install chomedriver
- rails how to use joins
- install rspec rails 5
- image crop android github
- powershell remove folder and contents
- git bash terminal weird characters
- terraform fmt
- install heroku mac
- bash download a file
- shell bash kommentti
- cat meaning linux