4 ms·
It's missing: git diff > ../i-messed-up.patch cd .. && rm -rf $REPO git clone $REMOTE cd $REPO && git apply ../i-messed-up.patch
by messe 3y ago
It's missing:
git diff > ../i-messed-up.patch
cd .. && rm -rf $REPO
git clone $REMOTE
cd $REPO && git apply ../i-messed-up.patch
- cakemuncher 3y agoWhy apply i-messed-up on main/master? Am I missing a meme here? What's the point of this?
- Pxtl 3y agoIt's basically automating the workflow described here: https://xkcd.com/1597/ https://xkcd.com/1597/
- u801e 3y agoThough, if you know enough to edit diffs by hand, you could use git apply --cached to stage parts of the diff in a way to make a sensible set of commits instead of a single commit for a large change.