Revert subset of changes from git branch -


i have 2 different git branches: master , experimental. both branches have own changes , commits. in experimental branch tried out various different things (through different files , commits).

now, want revert changes in experimental branch , keep 1 feature. want keep (pruned) experimental branch , keep working on until ready merged master.

so far, did diff between 2 branches (to see changes) , did ''git checkout master'' on files in experimental wanted revert master.

is there more efficient way?

what simplest way revert changes in few files in experimental branch master?

what simplest way revert changes in few files in experimental branch master?

create new branch master, , checkout experimental few files want:

git checkout -b exp2 master git checkout experimental -- path/to/file/or/dir 

at point, on new branch exp2, identical master, except few specific files/dirs checkout experimental.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -