I did a git stash on production but then others pushed more changes to the repository. So is there a way merge them both together. I can see the changes in the stash but not in the current head.
Git fsck shows
git fsck
dangling tree b00308a00025bbe3eaa370b326d82dae5b9403cc
dangling tree e714ea6c807bbdd039abfe8a8fb779c02403c3b3
dangling tree cc1e0f3768af3e5cb22fdfde7603f663c1812d78
dangling tree f51f1aa3298e21affb0b2ee31343f2c47df438c3
dangling tree b530b1163c677de735d82d7c11081921b35807ae
dangling tree bfb862564922f45cc272daac3e1d131fd254a8ed
dangling tree cdd02c02d05dfbc928c4ce9123fc4c360299395c
dangling tree b851786925e57bb2d7e71badefc5171b9110ccd5
dangling tree ae5caf6ede4e4b5f9c344ac3e749aaed6bee5e96
dangling tree e56ad067c775f25d18cab3520f3f1add2731c67d
dangling tree 1871498602802cbe324ed746395ac300884622ce
dangling tree c0f61e31611cf5fbed159737e9f04b9b214ed663
dangling tree 7bf8bdd7e6cca37cd1929473d50d2914cc1f94c1
Thanks.
One of the points of stash is that you can reapply it anywhere. You stashed away your changes, so they are stored as relative to the commit that was checked out then, but now that you’ve checked out a different commit, you’re free to use
git stash applyorgit stash popto apply the stashed changes. (popdeletes the stash once they’re successfully applied;applyleaves it.)Of course, if things have changed significantly, the stashed changes may no longer apply cleanly. Git will treat this as a merge conflict, and you can resolve it as you would any other merge conflict.