📎 Webclip
Git helpers - Simplify your git workflow
The page presents a set of Git aliases the author uses every day to avoid repeating the same commands. It groups them around common tasks such as starting work on an issue, updating a branch, cleaning up finished work, pushing changes, syncing a fork, and checking commit history or branch status.
Reading notes#
- The aliases were created because the author got tired of typing the same Git commands repeatedly.
- Some of the alias definitions were inherited from Nicholas C. Zakas’s gist.
ws 34updatesmasterfrom remote and creates a new branch namedissue34.wd 34deletes a finished branch from both local and remote Git.updaterebases a branch on the latestmasterwhen changes are already committed.updateDstashes uncommitted changes, updates frommaster, and reapplies the stash.rebase 4squashes commits by rebasing the last four commits fromHEAD; the default is two.pushsends branch changes to remote, but not tomaster.fpushforce-pushes with--force-with-leaseand also avoids pushing tomaster.pullpulls from upstream and merges into the current branch with--rebase --prune.ufupdates a fork by syncing upstreammasterinto localmasterand pushing it to origin.c "<message>"creates a quick commit with the given message and uses-a.logshows commits in one-line format with message, date, author, and other info.sshows the current branch status.- The setup instructions say to add the gist content to
.bashrc, reopen Bash, and runaliasto see the defined commands.
