lily33,

Learning git is very easy. For example, to do it on Debain, one simply needs to run, sudo apt install lazygit

Bipta,

Wow this looks great. Amend an old commit dealing with a rebase? Sign me up!

zalgotext,

git rebase -i origin/main (or whatever branch you’re rebasing on), then read the instructions that come up in the editor window

corytheboyd,
corytheboyd avatar

Read… instructions? I love teaching people that git very often prints out what you should do next.

git: “to continue, resolve conflicts, add files, and run rebase —continue”
dev: …time to search stack overflow

All that said… just use lazygit. It does help to know CLI git first to put things in context, but if you do, no need to punish yourself every day by not using a UI.

Kata1yst,
Kata1yst avatar

LazyGit may actually be black magic from Satan to tempt programmers into sin. And to that I say: 'where is a goat I can sacrifice to my dark lord?'

lolcatnip,

I swear to God sometimes git just conjures merge conflicts out of nothing.

kaffiene,

This week? I’ve been using it for years and I’m still learning it

m3t00,
@m3t00@lemmy.world avatar

coffee

Imbrex,

so do ya’ll like git or git in a hub?

ohlaph,

It do be like that sometimes.

ensignrick,

So many orphaned branches… Poor things.

noddy,

I prefer rebasing on destination branch before merging. When merging you get all the conflicts at the same time. When rebasing you can address conflicts from one commit at a time. Untangling multiple small knots is easier than one huge spaghetti. Also commit history will be much cleaner.

Shhalahr,

Go, Team Rebase!

AMillionNames,
yoz,

Lol what’s git?

NaoPb,

It’s what americans from a rural area say when they want you to go away.

EpicFailGuy,
@EpicFailGuy@lemmy.world avatar

is what people who don’t know vim and rsync have to use to mimic 1% of our power

kaffiene,

I just did myself an eye injury due to rolling them so much

twei,

git gud. HA, GOTTEM

UNWILLING_PARTICIPANT,

Yes you did

alcoholicorn,

It’s the thing you use to create a local copy of the main code base, and then merge your changes back in.

OP hasn’t done anything, and there’s 7 conflicts between his code and main. Presumably because someone else merged their changes in the time between when OP pulled his local copy and tried to push his (non-existent) changes.

UNWILLING_PARTICIPANT,

A very complicated way to do


<span style="color:#323232;">My project
</span><span style="color:#323232;">My project (1)
</span><span style="color:#323232;">My project WORKING
</span><span style="color:#323232;">My project (2)
</span><span style="color:#323232;">My project (2) (1)
</span>
yoz,

Lol

stilgar,
@stilgar@infosec.pub avatar

Pro tip: If your code gets flogged by git, you can always get revenge with git reflog 😉

cupcakezealot,
@cupcakezealot@lemmy.blahaj.zone avatar

lemme rebase the main branch onto my branch.

two minutes later

1 merge conflict of 57 [abort] [continue]

affiliate,

this is easily fixed by copy pasting the files into a new directory and never opening git again out of fear

caseyweederman,

Project managers hate this one weird trick!

kamen,

One key thing that can help you wrap your head around rebasing is that branches get switched while you’re doing it; so, say you’re on branch feature and do git rebase master, for any merge conflict, whatever’s marked “current” will be on master and what’s “incoming” is from feature.

There’s also git rerere that should in theory remember a resolution you do between two branches and reuse it every time after the first; I’ve rarely used it in practice; it would happen for long lived branches that don’t get merged.

roastpotatothief,

Git is a great invention but it has a few design flaws. There are too many ways to confuse it or break it, using commands that look correct, or just forgetting something. I ended up writing simple wrapper script codebase to fix it. Since then no problems.

Shhalahr,

Yeah. It’s got no abstraction between the UI and the implementation. You just want to manage code versions, but to use Git, you need to learn how to manage history graphs.

oce,
@oce@jlai.lu avatar

It was conceived for experts so the new user experience is shit and the UI is not intuitive. But it has become such a widespread standard that it is very hard to completely overhaul the UI.

Pxtl,
@Pxtl@lemmy.ca avatar

Even for experts the user experience is shit. Too much has to be done manually when the default should be automatic, like fetching before pull, recursing when working with repos that use submodules, allowing mismatched casing on case insensitive filesystems, etc.

oce,
@oce@jlai.lu avatar

Submodule commands are such mess, which is sad because it is a great feature.

roastpotatothief,

Yes you couldn’t change something so widely used. Look what happened with python 3.

Fortunately there’s already a tradition among Git users of building a UI on top of the git UI. My project is just a slightly better version of those. It lays a simple sensible interface on top of the chaotic Git interface.

sheogorath,

TBH compared to the old versioning system people used to use like SVN and Mercurial. Git is a godsend. Just taking your time in learning and not using a GUI client works wonders in learning how it works. Especially when all the GUI clients are basically a collection of commands being executed so if you fuck things up on CLI you know what happened vs using GUI.

lolcatnip,

I’m pretty sure Mercurial is newer than git, or at least from the same generation.

Andrew15_5,
@Andrew15_5@mander.xyz avatar
PeWu,

Oh, you haven’t seen my lack of skill then.

Andrew15_5,
@Andrew15_5@mander.xyz avatar

Show me.

lseif,

if u ever get a tricky merge conflict, just git push --force. this automatically works out the right code to keep (your own)

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

Also, a way to never have to work again!

Nahdahar,

Except if you’re an employer in a very small company.

Source: my boss did this at the first company I worked at.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmerhumor@lemmy.ml
  • kavyap
  • ngwrru68w68
  • osvaldo12
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • everett
  • slotface
  • tacticalgear
  • rosin
  • cubers
  • megavids
  • normalnudes
  • modclub
  • ethstaker
  • InstantRegret
  • GTA5RPClips
  • cisconetworking
  • Durango
  • Leos
  • provamag3
  • tester
  • anitta
  • JUstTest
  • lostlight
  • All magazines