💾 Archived View for bbs.geminispace.org › u › dmoonfire › 3089 captured on 2024-02-05 at 14:06:59. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

➡️ Next capture (2024-03-21)

🚧 View Differences

-=-=-=-=-=-=-

Comment by 🌙 dmoonfire

Re: "Anybody have useful git aliases they would like to share?..."

In: s/Linux

My favorite is: `mr = git push origin HEAD` which pushes up the current branch to origin using the name of the local branch as the name of the remote branch.

🌙 dmoonfire

2023-07-13 · 7 months ago

2 Later Comments ↓

🏕️ bjnaved [OP] · 2023-07-13 at 16:55:

Nice! I can use that to replace my more complicated `git push origin "$(git branch --show-current)"` :)

🚀 StanStani · 2023-07-13 at 18:06:

Hmm, I don't know if it counts but I have a hook that runs yarn every time I merge from main.

Original Post

🌒 s/Linux

Anybody have useful git aliases they would like to share? One that really helps me that I've defined is `co = !git checkout "$(git branch -a | fzf)"`. This lets me type `git co`, pick a branch interactively from the list, which then checks out that branch. (I know if I properly set up shell completions I'd get suggested branch names by hitting tab, but the fuzzy search behavior from fzf is really nice.)

💬 bjnaved · 3 comments · 2 likes · 2023-07-13 · 7 months ago · #git