2 ms·
90% of my git problems I’ve solved with two aliases: “git publish” and “git synced” Publish pushes to the remote (doing the right thing to safety update it, fo
by softwaredoug 3y ago
90% of my git problems I’ve solved with two aliases: “git publish” and “git synced”
Publish pushes to the remote (doing the right thing to safety update it, force push with lease).
Synced updates the local branch with the trunkiest-trunk (upstream preferred over origin, using whichever one of main or master exists). It rebases against that remote branch.
https://github.com/softwaredoug/idiot-proof-git https://github.com/softwaredoug/idiot-proof-git
(With handy shortcuts to create a PR and go to the repos URL)
- jmholla 3y agoI believe your synced alias can also largely be solved by adding this to your `.gitconfig`: [pull] rebase = true