git - Merging latest changes to sets of files from one branch to another -


one of more difficult things reliably in git right merge latest changes set of files 1 branch another. changed files in question have been modified across several various commits in branch , each commit containing these changes may have changes other files not relevant merge.

the quickest way can see this:

$ git checkout master $ git checkout topic1 -- *.vcproj *.mk subdir/somefile.txt $ git add . $ git commit -m 'merging latest changes these files topic1' 

the 2nd step somehow rebase/squash/etc topic1 clean , remove changes files moved master. efficient workflow this?

if have unrelated commits, perhaps should set new branches each separate real topic, starting @ branch point. go through history of messed branch, , git cherry-pick each commit it's right place. once have verified no changes got lost, rid of mess.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -