git rebase emergency sandbox commit without affecting another commit thats broken on stage -


this may partially unique scenario here, want rebase, , feel might break "stage" repo branch.

note, im developer, no worries other developers having these checkouts.

we have ticket 201, , have emergency ticket 407. 201 , 407(in order) have been commited, merged stage(branch), pushed stage.

both of these tickets failed pass qa on stage, both need fixes. 407 became emergency fix. 201 wait until 407 has made way production. had go sandbox(branch) , fix it. fixed, , ready commit. 201 needs wait. 201 commited before 407, , shows on both sandbox logs , stage logs.

im afraid if rebase out 201 on sandbox temporarily (not sure if best way) finalize 407 fix, when go merge push stage unbeknownst happen , push(or merge) complain unbeknownst errors because of 201 (which rebased out on sandbox) getting in way on stage.

is there way rebase out (ticket 201) make way 407 go through stage? happen 201 on stage?

if understand scenario correctly, have 2 feature branches have been merged main branches in particular order, , you're wondering if ok merge them again (with additional commits added) in different order. right?

this should absolutely fine, long don't affect same (or adjacent) lines of code, in case of course run conflicts (regardless of order merge them). however,if want cleaner history reset staging branch state in before merging either branch, , merge them again (in order).

if in doubt though, make sure branches in local clone date authoritative remote, if run problems merges locally can reset affected branch(es) remote (which acting backup in sense). can create local backups of branches if need experiment without touching originals, e.g

$ git checkout stage $ git checkout -b stage_bak 

you create local clone of entire repository if like. it, i've found best way figure out can git try stuff, break it, reset , try again.

good luck!


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -